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>
release/7.1
Michael Niedermayer 4 months ago
parent 9d25b9665e
commit 36924fa306
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 2
      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);
}
}

Loading…
Cancel
Save