mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avcodec/sbrdsp_fixed: Fix integer overflow in sbr_hf_apply_noise()
Fixes: runtime error: signed integer overflow: -2049425300 + -117591631 cannot be represented in type 'int'
Fixes: part of 2096/clusterfuzz-testcase-minimized-4901566068817920
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2061de8a3f
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
2170bdb56d
commit
0ddff40bf8
@ -253,8 +253,8 @@ static av_always_inline int sbr_hf_apply_noise(int (*Y)[2],
|
|||||||
int m;
|
int m;
|
||||||
|
|
||||||
for (m = 0; m < m_max; m++) {
|
for (m = 0; m < m_max; m++) {
|
||||||
int y0 = Y[m][0];
|
unsigned y0 = Y[m][0];
|
||||||
int y1 = Y[m][1];
|
unsigned y1 = Y[m][1];
|
||||||
noise = (noise + 1) & 0x1ff;
|
noise = (noise + 1) & 0x1ff;
|
||||||
if (s_m[m].mant) {
|
if (s_m[m].mant) {
|
||||||
int shift, round;
|
int shift, round;
|
||||||
|
Loading…
Reference in New Issue
Block a user