avcodec/aac/aacdec_usac_mps212: avoid shifting a negative IPD index

Undefined shift Replicated through API with UBSAN

Fixes: left shift of negative value -1
Fixes: 536321788/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_DEC_fuzzer-4601480396210176
Fixes: IsFvv6HEhVCP

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 authored and michaelni committed 2026-10-12 23:55:55 +00:00
1 parent 7c7c087059
commit 561130d30b
1 file changed
+1 -1
+1 -1
View File
@@ -375,7 +375,7 @@ static void attach_lsb(GetBitContext *gb, int16_t *data_msb,
int msb = data_msb[i];
if (nb_lsb > 0) {
uint32_t lsb = get_bits(gb, nb_lsb);
data[i] = ((msb << nb_lsb) | lsb) - offset;
data[i] = ((msb * (1 << nb_lsb)) | lsb) - offset;
} else {
data[i] = msb - offset;
}