diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2022-09-29 23:16:51 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-10-04 23:47:54 +0200 |
commit | 77164b2344eb67d61f973ebbbc8e0b88aaae027b (patch) | |
tree | 67700120859ec3b035c0fe706ad3b1f1cc6a8942 | |
parent | 5f44489cc5d4f3767f6ad2ad067ee6a3f78374bb (diff) | |
download | ffmpeg-77164b2344eb67d61f973ebbbc8e0b88aaae027b.tar.gz |
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>
-rw-r--r-- | libavcodec/speexdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/speexdec.c b/libavcodec/speexdec.c index 9793d939fc..08c7e77e7d 100644 --- a/libavcodec/speexdec.c +++ b/libavcodec/speexdec.c @@ -1452,7 +1452,7 @@ static av_cold int speex_decode_init(AVCodecContext *avctx) return AVERROR_INVALIDDATA; s->nb_channels = avctx->ch_layout.nb_channels; - if (s->nb_channels <= 0) + if (s->nb_channels <= 0 || s->nb_channels > 2) return AVERROR_INVALIDDATA; switch (s->rate) { |