[FFmpeg-devel] [PATCH] Do not read beyond input in EA-TGV

Vitor Sessak vitor1001
Fri Feb 26 19:12:49 CET 2010


Peter Ross wrote:
> On Fri, Feb 19, 2010 at 06:20:51PM +0100, Vitor Sessak wrote:
>> $subj, as now result of FATE test #362 depends on uninitialized memory.
>>
>> -Vitor
> 
>> Index: libavcodec/eatgv.c
>> ===================================================================
>> --- libavcodec/eatgv.c	(revision 21872)
>> +++ libavcodec/eatgv.c	(working copy)
>> @@ -192,6 +192,10 @@
>>              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++) {
> 
> Ok.

Applied.

-Vitor



More information about the ffmpeg-devel mailing list