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

Jai Menon jmenon86
Sun Mar 28 19:19:34 CEST 2010


On Sun, Mar 28, 2010 at 7:54 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> 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

thanks, applied.

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

sure, that's fine with me. i'll also look into any bugreports as and
when they come.

-- 
Jai Menon



More information about the ffmpeg-devel mailing list