changeset 8945:3ce78c919959 libavcodec

Make BMP decoder try to decode files with incorrect filesize field value
author kostya
date Mon, 16 Feb 2009 06:57:11 +0000
parents 1b00a4a76ade
children cc6a2fb661af
files bmp.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/bmp.c	Mon Feb 16 02:02:49 2009 +0000
+++ b/bmp.c	Mon Feb 16 06:57:11 2009 +0000
@@ -64,9 +64,9 @@
 
     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 */