[FFmpeg-devel] [PATCH] tta : add output buffer size check

Michael Niedermayer michaelni
Sun Mar 28 16:24:52 CEST 2010


On Sun, Mar 28, 2010 at 06:15:15PM +0530, Jai Menon wrote:
> On Sun, Mar 28, 2010 at 5:40 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > 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
> 
> yeah, but last_frame_length is necessarily < frame_length so the check
> is good imho.

seems so, so patch ok

btw, do you want to take over tta maintaince? alex is not exactly
active, so some co-maintainer cant hurt

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- 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/49608435/attachment.pgp>



More information about the ffmpeg-devel mailing list