[FFmpeg-devel] [PATCH] make tmv.c check packet sizes before reading

Vitor Sessak vitor1001
Sun May 17 11:48:20 CEST 2009


Michael Niedermayer wrote:
> On Sat, May 16, 2009 at 07:56:31PM +0200, Vitor Sessak wrote:
>> 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 ?
> 
> fine

Applied.

-Vitor



More information about the ffmpeg-devel mailing list