Fix overflows in ixheaacd_scale_adjust (#126)
Some checks failed
CMake / build (push) Has been cancelled

Significance:
============
- Handles overflows in ixheaacd_scale_adjust.

Testing:
============
- All previous fuzzer crashes are tested. No crash observed.
- Conformance passing on Windows

Co-authored-by: Shashank Pathmudi <100897@ittiam.com>
This commit is contained in:
ShashankPathmudi 2026-03-13 16:33:13 +05:30 committed by GitHub
parent bd6a8bbbfb
commit cb284e5485
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -327,8 +327,7 @@ VOID ixheaacd_scale_adjust(WORD32 *samples, UWORD32 frame_len,
WORD32 j;
for (i = 0; i < frame_len; i++) {
for (j = 0; j < num_channels; j++) {
WORD32 gain_t = (WORD32)(1 << *(qshift_adj + j));
samples[i * num_channels + j] = (samples[i * num_channels + j] * gain_t);
samples[i * num_channels + j] = ixheaac_shl32_sat(samples[i * num_channels + j], qshift_adj[j]);
}
}
}