aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-07-02 03:30:54 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-07-19 03:39:52 +0200
commita76db7176ab8ff0eaf28f97d79254fe96a4dd520 (patch)
treefee400eab18e84282a790b8ab146368db0b8885b /libavcodec
parenta954b531f63bef13c26a574ecbd7a4c099f56693 (diff)
downloadffmpeg-a76db7176ab8ff0eaf28f97d79254fe96a4dd520.tar.gz
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 2061de8a3f73f14806e5f6ccaf9a635f740a54e6) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/sbrdsp_fixed.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/sbrdsp_fixed.c b/libavcodec/sbrdsp_fixed.c
index f42708a8a7..7d593a18b8 100644
--- a/libavcodec/sbrdsp_fixed.c
+++ b/libavcodec/sbrdsp_fixed.c
@@ -253,8 +253,8 @@ static av_always_inline int sbr_hf_apply_noise(int (*Y)[2],
int m;
for (m = 0; m < m_max; m++) {
- int y0 = Y[m][0];
- int y1 = Y[m][1];
+ unsigned y0 = Y[m][0];
+ unsigned y1 = Y[m][1];
noise = (noise + 1) & 0x1ff;
if (s_m[m].mant) {
int shift, round;