summaryrefslogtreecommitdiff
path: root/libavcodec/bmp.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2009-02-16 06:57:11 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2009-02-16 06:57:11 +0000
commit42402a55b05e3bb70b4029673a7d08452861a090 (patch)
tree0e41e4f4419e1cfe622ee9accf8dd3b8cc35c78d /libavcodec/bmp.c
parentf9d5bf3c2de8b0753f8da1546021ec7a06859820 (diff)
Make BMP decoder try to decode files with incorrect filesize field value
Originally committed as revision 17363 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/bmp.c')
-rw-r--r--libavcodec/bmp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c
index 3d06f1965d..14c070da8f 100644
--- a/libavcodec/bmp.c
+++ b/libavcodec/bmp.c
@@ -64,9 +64,9 @@ static int bmp_decode_frame(AVCodecContext *avctx,
fsize = bytestream_get_le32(&buf);
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);
- return -1;
+ fsize = buf_size;
}
buf += 2; /* reserved1 */