diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-19 12:14:59 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-19 13:14:12 +0200 |
commit | 2ccd2c9003c77aee8ffb5f4f43863e35bdf0e4b6 (patch) | |
tree | a07f9e70ee70d6b502a593d06b5d0388bd3ca38b /libavcodec/sbrdsp_fixed.c | |
parent | 55b56a8d6a061db7dff730341f062086f65d4bd4 (diff) | |
download | ffmpeg-2ccd2c9003c77aee8ffb5f4f43863e35bdf0e4b6.tar.gz |
avcodec/aacsbr_fixed: Fix multiple runtime error: left shift of negative value -407
Fixes: 1674/clusterfuzz-testcase-minimized-6092531563495424
Fixes: 1686/clusterfuzz-testcase-minimized-6282691643179008
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/sbrdsp_fixed.c')
-rw-r--r-- | libavcodec/sbrdsp_fixed.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/sbrdsp_fixed.c b/libavcodec/sbrdsp_fixed.c index fb9aba4e8d..a018b4dd82 100644 --- a/libavcodec/sbrdsp_fixed.c +++ b/libavcodec/sbrdsp_fixed.c @@ -116,7 +116,7 @@ static av_always_inline SoftFloat autocorr_calc(int64_t accu) } else { nz = 0; while (FFABS(i) < 0x40000000) { - i <<= 1; + i *= 2; nz++; } nz = 32-nz; @@ -125,7 +125,7 @@ static av_always_inline SoftFloat autocorr_calc(int64_t accu) round = 1U << (nz-1); mant = (int)((accu + round) >> nz); mant = (mant + 0x40)>>7; - mant <<= 6; + mant *= 64; expo = nz + 15; return av_int2sf(mant, 30 - expo); } |