avcodec/aac/aacdec_usac: Dont leave invalid max_sfb in the context

Fixes: out of array read
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>
This commit is contained in:
Michael Niedermayer 2024-07-19 22:20:46 +02:00
parent d52fabaec0
commit ae20be8b5d
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -834,6 +834,7 @@ static int setup_sce(AACDecContext *ac, SingleChannelElement *sce,
"Number of scalefactor bands in group (%d) "
"exceeds limit (%d).\n",
ics->max_sfb, ics->num_swb);
ics->max_sfb = 0;
return AVERROR(EINVAL);
}