mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-14 22:22:59 +02:00
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/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 74bbf9bc8279e0b8eba89c8cca68e8ad7ff547ed) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
c526fc591a
commit
3f2f2b18c8
@ -110,6 +110,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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user