diff --git a/contrib/sdk/sources/ffmpeg/ffmpeg-2.8/libavformat/asfdec_o.c b/contrib/sdk/sources/ffmpeg/ffmpeg-2.8/libavformat/asfdec_o.c index 6b4216cab..4410e49fd 100644 --- a/contrib/sdk/sources/ffmpeg/ffmpeg-2.8/libavformat/asfdec_o.c +++ b/contrib/sdk/sources/ffmpeg/ffmpeg-2.8/libavformat/asfdec_o.c @@ -695,7 +695,8 @@ static int parse_video_info(AVIOContext *pb, AVStream *st) st->codec->codec_tag = tag; st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tag); - if (size > BMP_HEADER_SIZE) { + if (size > BMP_HEADER_SIZE && + size < INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE) { int ret; st->codec->extradata_size = size - BMP_HEADER_SIZE; if (!(st->codec->extradata = av_malloc(st->codec->extradata_size +