mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-05 22:33:37 +00:00
avcodec/sbrdsp_fixed: Fix integer overflow
Fixes: signed integer overflow: 2147483598 + 64 cannot be represented in type 'int' Fixes: 4337/clusterfuzz-testcase-minimized-6192658616680448 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:
parent
31de45d20b
commit
12a511f2c2
@ -133,7 +133,7 @@ static av_always_inline SoftFloat autocorr_calc(int64_t accu)
|
|||||||
|
|
||||||
round = 1U << (nz-1);
|
round = 1U << (nz-1);
|
||||||
mant = (int)((accu + round) >> nz);
|
mant = (int)((accu + round) >> nz);
|
||||||
mant = (mant + 0x40)>>7;
|
mant = (mant + 0x40LL)>>7;
|
||||||
mant *= 64;
|
mant *= 64;
|
||||||
expo = nz + 15;
|
expo = nz + 15;
|
||||||
return av_int2sf(mant, 30 - expo);
|
return av_int2sf(mant, 30 - expo);
|
||||||
|
Loading…
Reference in New Issue
Block a user