[FFmpeg-cvslog] r13282 - trunk/libavcodec/ra144.c

vitor subversion
Sat May 24 18:20:37 CEST 2008


Author: vitor
Date: Sat May 24 18:20:37 2008
New Revision: 13282

Log:
Handle the case where we do not have enough input

Modified:
   trunk/libavcodec/ra144.c

Modified: trunk/libavcodec/ra144.c
==============================================================================
--- trunk/libavcodec/ra144.c	(original)
+++ trunk/libavcodec/ra144.c	Sat May 24 18:20:37 2008
@@ -343,9 +343,11 @@ static int ra144_decode_frame(AVCodecCon
     Real144_internal *glob = avctx->priv_data;
     GetBitContext gb;
 
-    if(buf_size == 0)
-        return 0;
-
+    if(buf_size < 20) {
+        av_log(avctx, AV_LOG_ERROR,
+               "Frame too small (%d bytes). Truncated file?\n", buf_size);
+        return buf_size;
+    }
     init_get_bits(&gb, buf, 20 * 8);
 
     for (i=0; i<10; i++)




More information about the ffmpeg-cvslog mailing list