[FFmpeg-devel] [PATCH] make tmv.c check packet sizes before reading
Michael Niedermayer
michaelni
Sun May 17 02:41:42 CEST 2009
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
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090517/75284f93/attachment.pgp>
More information about the ffmpeg-devel
mailing list