avcodec/aac/aacdec_lpd: Check kv indec

Fixes: index 9 out of bounds for type 'uint32_t [8][8]'
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@niedermayer.cc>
release/7.1
Michael Niedermayer 5 months ago
parent ae20be8b5d
commit 2f7aaa33e7
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 3
      libavcodec/aac/aacdec_lpd.c

@ -130,6 +130,9 @@ int ff_aac_parse_fac_data(AACUsacElemData *ce, GetBitContext *gb,
if (use_gain)
ce->fac.gain = get_bits(gb, 7);
if (len/8 > 8)
return AVERROR_PATCHWELCOME;
for (int i = 0; i < len/8; i++) {
ret = parse_codebook_idx(gb, ce->fac.kv[i], 1, 1);
if (ret < 0)

Loading…
Cancel
Save