[FFmpeg-cvslog] r22082 - trunk/libavcodec/eatgv.c

vitor subversion
Fri Feb 26 19:12:28 CET 2010


Author: vitor
Date: Fri Feb 26 19:12:27 2010
New Revision: 22082

Log:
Do not read beyond end of input in EA-TGV. This should avoid FATE test #362
result depending on uninitialized data.

FATE result may change for this test.

Modified:
   trunk/libavcodec/eatgv.c

Modified: trunk/libavcodec/eatgv.c
==============================================================================
--- trunk/libavcodec/eatgv.c	Fri Feb 26 17:21:56 2010	(r22081)
+++ trunk/libavcodec/eatgv.c	Fri Feb 26 19:12:27 2010	(r22082)
@@ -192,6 +192,10 @@ static int tgv_decode_inter(TgvContext *
             s->block_codebook[i][15-j] = tmp[get_bits(&gb, 2)];
     }
 
+    if (get_bits_left(&gb) < vector_bits *
+        (s->avctx->height/4) * (s->avctx->width/4))
+        return -1;
+
     /* read vectors and build frame */
     for(y=0; y<s->avctx->height/4; y++)
     for(x=0; x<s->avctx->width/4; x++) {



More information about the ffmpeg-cvslog mailing list