[FFmpeg-cvslog] avcodec/celp_filters: Fix runtime error: signed integer overflow: 1892453989 + 381702783 cannot be represented in type 'int'

Michael Niedermayer git at videolan.org
Tue May 23 17:25:32 EEST 2017


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue May 23 14:50:55 2017 +0200| [fb75ad79cb8a00d42857b252e0049a0bbe90da66] | committer: Michael Niedermayer

avcodec/celp_filters: Fix runtime error: signed integer overflow: 1892453989 + 381702783 cannot be represented in type 'int'

Fixes: 1766/clusterfuzz-testcase-minimized-6562020075765760

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fb75ad79cb8a00d42857b252e0049a0bbe90da66
---

 libavcodec/celp_filters.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/celp_filters.c b/libavcodec/celp_filters.c
index a81fd8831b..fafedd99a3 100644
--- a/libavcodec/celp_filters.c
+++ b/libavcodec/celp_filters.c
@@ -67,7 +67,7 @@ int ff_celp_lp_synthesis_filter(int16_t *out, const int16_t *filter_coeffs,
     for (n = 0; n < buffer_length; n++) {
         int sum = -rounder, sum1;
         for (i = 1; i <= filter_length; i++)
-            sum += filter_coeffs[i-1] * out[n-i];
+            sum += (unsigned)(filter_coeffs[i-1] * out[n-i]);
 
         sum1 = ((-sum >> 12) + in[n]) >> shift;
         sum  = av_clip_int16(sum1);



More information about the ffmpeg-cvslog mailing list