[FFmpeg-cvslog] r22711 - trunk/libavcodec/tta.c

Jai Menon jmenon86
Mon Mar 29 09:01:12 CEST 2010


On Mon, Mar 29, 2010 at 3:39 AM, Stefano Sabatini
<stefano.sabatini-lala at poste.it> wrote:
> On date Sunday 2010-03-28 19:17:48 +0200, jai_menon wrote:
>> Author: jai_menon
>> Date: Sun Mar 28 19:17:48 2010
>> New Revision: 22711
>>
>> Log:
>> TTA : Check if the output buffer size is within bounds.
>>
>> Modified:
>> ? ?trunk/libavcodec/tta.c
>>
>> Modified: trunk/libavcodec/tta.c
>> ==============================================================================
>> --- trunk/libavcodec/tta.c ? ?Sun Mar 28 15:39:36 2010 ? ? ? ?(r22710)
>> +++ trunk/libavcodec/tta.c ? ?Sun Mar 28 19:17:48 2010 ? ? ? ?(r22711)
>> @@ -302,6 +302,10 @@ static int tta_decode_frame(AVCodecConte
>> ? ? ? ? ?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");
>
> Missing space after comma.

Must've missed that. will fix.

>> + ? ? ? ? ? ?return -1;
>
> AVERROR_INVALIDDATA.

I'm not sure about this. For very high sample rate media, this check
might trigger and the data is clearly not invalid.

-- 
Jai Menon



More information about the ffmpeg-cvslog mailing list