aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aac
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-09-19 23:10:58 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2024-09-24 15:37:16 +0200
commit36924fa306271c3a8fdfee451a716d0da3fc6972 (patch)
tree3c613c537146fc0b10774d57fbb826de20c7c570 /libavcodec/aac
parent9d25b9665edb45c31ad6dda9612fd6e63fc289f3 (diff)
downloadffmpeg-36924fa306271c3a8fdfee451a716d0da3fc6972.tar.gz
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@niedermayer.cc>
Diffstat (limited to 'libavcodec/aac')
-rw-r--r--libavcodec/aac/aacdec.c2
1 files changed, 1 insertions, 1 deletions
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);
}
}