[FFmpeg-cvslog] avcodec/aac/aacdec_usac: Clean ics2->max_sfb when first SCE fails

Michael Niedermayer git at videolan.org
Wed Dec 11 23:22:00 EET 2024


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Wed Jul 31 20:59:49 2024 +0200| [682d710bcb8d21d8cda0182bb1725663dbbac7cd] | committer: Michael Niedermayer

avcodec/aac/aacdec_usac: Clean ics2->max_sfb when first SCE fails

Fixes: out of array access
Fixes: 70734/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-4741427068731392
Fixes: 383194070/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-5302387708854272

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Lynne <dev at lynne.ee>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=682d710bcb8d21d8cda0182bb1725663dbbac7cd
---

 libavcodec/aac/aacdec_usac.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c
index 1b79d19a30..5efa248238 100644
--- a/libavcodec/aac/aacdec_usac.c
+++ b/libavcodec/aac/aacdec_usac.c
@@ -917,8 +917,10 @@ static int decode_usac_stereo_info(AACDecContext *ac, AACUSACConfig *usac,
         }
 
         ret = setup_sce(ac, sce1, usac);
-        if (ret < 0)
+        if (ret < 0) {
+            ics2->max_sfb = 0;
             return ret;
+        }
 
         ret = setup_sce(ac, sce2, usac);
         if (ret < 0)



More information about the ffmpeg-cvslog mailing list