mirror of https://git.ffmpeg.org/ffmpeg.git
Make BMP decoder try to decode files with incorrect filesize field value
Originally committed as revision 17363 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
f9d5bf3c2d
commit
42402a55b0
|
@ -64,9 +64,9 @@ static int bmp_decode_frame(AVCodecContext *avctx,
|
||||||
|
|
||||||
fsize = bytestream_get_le32(&buf);
|
fsize = bytestream_get_le32(&buf);
|
||||||
if(buf_size < fsize){
|
if(buf_size < fsize){
|
||||||
av_log(avctx, AV_LOG_ERROR, "not enough data (%d < %d)\n",
|
av_log(avctx, AV_LOG_ERROR, "not enough data (%d < %d), trying to decode anyway\n",
|
||||||
buf_size, fsize);
|
buf_size, fsize);
|
||||||
return -1;
|
fsize = buf_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
buf += 2; /* reserved1 */
|
buf += 2; /* reserved1 */
|
||||||
|
|
Loading…
Reference in New Issue