mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-09-19 12:56:40 +00:00
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 77164b2344
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
e4c5c90493
commit
59fe00912a
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user