Commit 74bbf9bc authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/adpcm: Check number of channels for MTAF

Fixes: out of array access
Fixes: 17608/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ADPCM_MTAF_fuzzer-5074936267276288

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 89cbbe9f
......@@ -111,6 +111,10 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx)
case AV_CODEC_ID_ADPCM_MTAF:
min_channels = 2;
max_channels = 8;
if (avctx->channels & 1) {
avpriv_request_sample(avctx, "channel count %d\n", avctx->channels);
return AVERROR_PATCHWELCOME;
}
break;
case AV_CODEC_ID_ADPCM_PSX:
max_channels = 8;
......
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