[FFmpeg-cvslog] avcodec/aac/aacdec: use correct index in deallocation
Michael Niedermayer
git at videolan.org
Tue Sep 24 17:40:09 EEST 2024
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Thu Sep 19 23:10:58 2024 +0200| [36924fa306271c3a8fdfee451a716d0da3fc6972] | committer: Michael Niedermayer
avcodec/aac/aacdec: use correct index in deallocation
Fixes: memleak
Fixes: 71084/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-5857751899635712
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=36924fa306271c3a8fdfee451a716d0da3fc6972
---
libavcodec/aac/aacdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c
index c37de2e003..4110bc40ca 100644
--- a/libavcodec/aac/aacdec.c
+++ b/libavcodec/aac/aacdec.c
@@ -1104,7 +1104,7 @@ static av_cold int decode_close(AVCodecContext *avctx)
OutputConfiguration *oc = &ac->oc[i];
AACUSACConfig *usac = &oc->usac;
for (int j = 0; j < usac->nb_elems; j++) {
- AACUsacElemConfig *ec = &usac->elems[i];
+ AACUsacElemConfig *ec = &usac->elems[j];
av_freep(&ec->ext.pl_data);
}
}
More information about the ffmpeg-cvslog
mailing list