mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/alsdec: No channels cannot be accessed
Fixes: out of array access Fixes: 48145/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5054524173189120 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
cd847f86d3
commit
9fec43a92d
@ -361,6 +361,9 @@ static av_cold int read_specific_config(ALSDecContext *ctx)
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
|
||||
if (avctx->ch_layout.nb_channels == 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
ctx->cur_frame_length = sconf->frame_length;
|
||||
|
||||
// read channel config
|
||||
|
Loading…
Reference in New Issue
Block a user