Fixes: left shift of negative value -30635
Fixes: 17689/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ACELP_KELVIN_fuzzer-5756275014500352
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
int i, j;
f[0] = 0x400000; // 1.0 in (3.22)
- f[1] = -lsp[0] << 8; // *2 and (0.15) -> (3.22)
+ f[1] = -lsp[0] * 256; // *2 and (0.15) -> (3.22)
for(i=2; i<=lp_half_order; i++)
{
for(j=i; j>1; j--)
f[j] -= MULL(f[j-1], lsp[2*i-2], FRAC_BITS) - f[j-2];
- f[1] -= lsp[2*i-2] << 8;
+ f[1] -= lsp[2*i-2] * 256;
}
}