mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
avcodec/adpcm: check block_align for PSXC
Fixes: division by 0 Fixes: 457634826/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ADPCM_PSXC_DEC_fuzzer-4903668521697280 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
James Almer
parent
13c91c97d1
commit
8ac6325143
@@ -294,7 +294,7 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx)
|
||||
break;
|
||||
case AV_CODEC_ID_ADPCM_PSXC:
|
||||
max_channels = 8;
|
||||
if (avctx->ch_layout.nb_channels <= 0)
|
||||
if (avctx->ch_layout.nb_channels <= 0 || avctx->block_align <= 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
break;
|
||||
case AV_CODEC_ID_ADPCM_IMA_DAT4:
|
||||
|
||||
Reference in New Issue
Block a user