Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-09-24 00:52:04 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2019-09-24 13:24:41 +0300
commit74bbf9bc8279e0b8eba89c8cca68e8ad7ff547ed (patch)
treebaf2ba78cbe7d7ca137595aa30a5b9c74fb8246e /libavcodec/adpcm.c
parent89cbbe9f70fc0ebe3f7227f939aa8e5841e6d218 (diff)
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>
Diffstat (limited to 'libavcodec/adpcm.c')
-rw-r--r--libavcodec/adpcm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index fb126503d6..7f2ebfc99d 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -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;