[FFmpeg-cvslog] avcodec/wavarc: Check order before using it to write the list
Michael Niedermayer
git at videolan.org
Mon May 1 02:04:50 EEST 2023
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Apr 16 17:51:02 2023 +0200| [e2e34c7731372b65b41ddb11334ccaeba4a76f13] | committer: Michael Niedermayer
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 at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e2e34c7731372b65b41ddb11334ccaeba4a76f13
---
libavcodec/wavarc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/wavarc.c b/libavcodec/wavarc.c
index 896972cec8..827803c91d 100644
--- a/libavcodec/wavarc.c
+++ b/libavcodec/wavarc.c
@@ -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++) {
More information about the ffmpeg-cvslog
mailing list