[FFmpeg-devel] [PATCH] tta : add output buffer size check
Michael Niedermayer
michaelni
Sun Mar 28 14:10:06 CEST 2010
On Sun, Mar 28, 2010 at 04:00:08PM +0530, Jai Menon wrote:
> Hello,
>
> as in subject. should fix issue 1848.
>
> --
> Jai Menon
> tta.c | 4 ++++
> 1 file changed, 4 insertions(+)
> 8b7094c9fccf093b8e4bd59fba68703efffc380a tta_buffer_bounds_check.patch
> Index: libavcodec/tta.c
> ===================================================================
> --- libavcodec/tta.c (revision 22706)
> +++ libavcodec/tta.c (working copy)
> @@ -302,6 +302,10 @@
> int cur_chan = 0, framelen = s->frame_length;
> int32_t *p;
>
> + if (*data_size < (framelen * s->channels * 2)) {
> + av_log(avctx, AV_LOG_ERROR,"Output buffer size is too small.\n");
> + return -1;
> + }
framelen can be changed a few lines later
also testing with tools/trasher probably doesnt hurt
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- 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/20100328/3513e4a9/attachment.pgp>
More information about the ffmpeg-devel
mailing list