mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/wavarc: Check order before using it to write the list
Fixes: out of array access Fixes: 45982/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVARC_fuzzer-6247711015043072 Fixes: 45982/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVARC_fuzzer-6487578428964864 Fixes: 45982/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVARC_fuzzer-6651587794960384 Fixes: 45982/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVARC_fuzzer-6686265824378880 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:
parent
957106a24d
commit
e2e34c7731
@ -343,6 +343,8 @@ static int decode_2slp(AVCodecContext *avctx,
|
||||
break;
|
||||
case 0:
|
||||
order = get_urice(gb, 2);
|
||||
if ((unsigned)order >= FF_ARRAY_ELEMS(s->filter[ch]))
|
||||
return AVERROR_INVALIDDATA;
|
||||
for (int o = 0; o < order; o++)
|
||||
s->filter[ch][o] = get_srice(gb, 2);
|
||||
for (int n = 0; n < s->nb_samples; n++) {
|
||||
|
Loading…
Reference in New Issue
Block a user