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>2022-09-30 00:16:51 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2022-11-04 01:29:55 +0300
commit59fe00912a48aa877b7538a8620e6ecedbdba88c (patch)
tree4061f259dc740198366a130c587fb363d24d9bff
parente4c5c904932b2ddc1f2c7b2e38ddf1fdaba09875 (diff)
avcodec/speexdec: Check channels > 2
More than 2 channels seems unsupported, the code seems to just output empty extra channels Fixes: Timeout Fixes: 51569/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SPEEX_fuzzer-5511509165342720 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 77164b2344eb67d61f973ebbbc8e0b88aaae027b) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/speexdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/speexdec.c b/libavcodec/speexdec.c
index ee95417deb..a7adcbfba4 100644
--- a/libavcodec/speexdec.c
+++ b/libavcodec/speexdec.c
@@ -1451,7 +1451,7 @@ static av_cold int speex_decode_init(AVCodecContext *avctx)
return AVERROR_INVALIDDATA;
s->nb_channels = avctx->channels;
- if (s->nb_channels <= 0)
+ if (s->nb_channels <= 0 || s->nb_channels > 2)
return AVERROR_INVALIDDATA;
switch (s->rate) {