[FFmpeg-cvslog] avcodec/aac/aacdec_usac: Dont leave invalid max_sfb in the context

Michael Niedermayer git at videolan.org
Wed Jul 24 00:24:20 EEST 2024


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Jul 19 22:20:46 2024 +0200| [ae20be8b5d0b3044b2094127d6ba1f529add50cc] | committer: Michael Niedermayer

avcodec/aac/aacdec_usac: Dont leave invalid max_sfb in the context

Fixes: out of array read
Fixes: 70363/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-6723855293415424.fuzz

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=ae20be8b5d0b3044b2094127d6ba1f529add50cc
---

 libavcodec/aac/aacdec_usac.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c
index 32b3c534bf..1b79d19a30 100644
--- a/libavcodec/aac/aacdec_usac.c
+++ b/libavcodec/aac/aacdec_usac.c
@@ -834,6 +834,7 @@ static int setup_sce(AACDecContext *ac, SingleChannelElement *sce,
                "Number of scalefactor bands in group (%d) "
                "exceeds limit (%d).\n",
                ics->max_sfb, ics->num_swb);
+        ics->max_sfb = 0;
         return AVERROR(EINVAL);
     }
 



More information about the ffmpeg-cvslog mailing list