[FFmpeg-devel] [PATCH 2/2] avcodec/sbrdsp_fixed: Fix integer overflow
Michael Niedermayer
michael at niedermayer.cc
Wed Nov 22 22:00:58 EET 2017
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 at niedermayer.cc>
---
libavcodec/sbrdsp_fixed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/sbrdsp_fixed.c b/libavcodec/sbrdsp_fixed.c
index a0ef6859f1..0db932a105 100644
--- a/libavcodec/sbrdsp_fixed.c
+++ b/libavcodec/sbrdsp_fixed.c
@@ -133,7 +133,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 = (mant + 0x40ll)>>7;
mant *= 64;
expo = nz + 15;
return av_int2sf(mant, 30 - expo);
--
2.15.0
More information about the ffmpeg-devel
mailing list