Commit b5228e44 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/aacdec_fixed: Fix runtime error: shift exponent 34 is too large for 32-bit type 'int'

Fixes: 1721/clusterfuzz-testcase-minimized-4719352135811072

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent efeb47fd
......@@ -207,7 +207,11 @@ static void noise_scale(int *coefs, int scale, int band_energy, int len)
c /= band_energy;
s = 21 + nlz - (s >> 2);
if (s > 0) {
if (s > 31) {
for (i=0; i<len; i++) {
coefs[i] = 0;
}
} else if (s > 0) {
round = 1 << (s-1);
for (i=0; i<len; i++) {
out = (int)(((int64_t)coefs[i] * c) >> 32);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment