[FFmpeg-devel] [PATCH] make tmv.c check packet sizes before reading
Vitor Sessak
vitor1001
Sat May 16 19:56:31 CEST 2009
Michael Niedermayer wrote:
> On Sat, May 16, 2009 at 06:24:42PM +0200, Vitor Sessak wrote:
>> $subj, should fix this FATE test:
>> http://fate.multimedia.cx/index.php?test_result=15593100
>>
>> -Vitor
>
>> tmv.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>> 74c0725abcfcd5541ed4933d44603df895e58fce tmv.diff
>> Index: libavcodec/tmv.c
>> ===================================================================
>> --- libavcodec/tmv.c (revision 18855)
>> +++ libavcodec/tmv.c (working copy)
>> @@ -52,6 +52,13 @@
>> return -1;
>> }
>>
>> + if (avpkt->size < 2*char_rows*char_cols) {
>> + av_log(avctx, AV_LOG_ERROR,
>> + "Input buffer too small, truncated sample?\n");
>> + *data_size = 0;
>
>> + return 0;
>
> it should be some negative number
-1 ?
-Vitor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tmv2.diff
Type: text/x-diff
Size: 527 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090516/9152e39a/attachment.diff>
More information about the ffmpeg-devel
mailing list