Commit 5727b1f1 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/dstdec: Check sample rate

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/ffmpegReviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 6dd5da3f
......@@ -86,6 +86,10 @@ static av_cold int decode_init(AVCodecContext *avctx)
return AVERROR_PATCHWELCOME;
}
if (DST_SAMPLES_PER_FRAME(avctx->sample_rate) & 7) {
return AVERROR_PATCHWELCOME;
}
avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
for (i = 0; i < avctx->channels; i++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment