[FFmpeg-devel] [PATCH 2/2] avcodec/dstdec: Check sample rate

Paul B Mahol onemda at gmail.com
Fri Feb 14 17:37:32 EET 2020


Actually I'm pretty sure log message is not needed as not power of 8
is simply not possible.

On 2/14/20, Paul B Mahol <onemda at gmail.com> wrote:
> LGTM
>
> On 2/13/20, Michael Niedermayer <michael at niedermayer.cc> wrote:
>> Fixes: out of array access
>> Fixes:
>> 20659/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DST_fuzzer-5735812071424000
>>
>> Found-by: continuous fuzzing process
>> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
>> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
>> ---
>>  libavcodec/dstdec.c | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/libavcodec/dstdec.c b/libavcodec/dstdec.c
>> index bdabced823..0505d3fde5 100644
>> --- a/libavcodec/dstdec.c
>> +++ b/libavcodec/dstdec.c
>> @@ -86,6 +86,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
>>          return AVERROR_PATCHWELCOME;
>>      }
>>
>> +    if (DST_SAMPLES_PER_FRAME(avctx->sample_rate) & 7) {
>> +        avpriv_request_sample(avctx, "sample rate %d",
>> avctx->sample_rate);
>> +        return AVERROR_PATCHWELCOME;
>> +    }
>> +
>>      avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
>>
>>      for (i = 0; i < avctx->channels; i++)
>> --
>> 2.17.1
>>
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-devel mailing list