[FFmpeg-devel] [PATCH] make tmv.c check packet sizes before reading
Michael Niedermayer
michaelni
Sat May 16 19:42:35 CEST 2009
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
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- 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/20090516/897f1b9b/attachment.pgp>
More information about the ffmpeg-devel
mailing list