[FFmpeg-cvslog] avcodec/flacdsp: Fix: runtime error: signed integer overflow: -1027555328 + -1226681270 cannot be represented in type 'int'

Michael Niedermayer git at videolan.org
Sun Feb 26 18:16:52 EET 2017


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Feb 25 21:07:26 2017 +0100| [7e9ba78f6bd10edae77d1126ada109709e981e9f] | committer: Michael Niedermayer

avcodec/flacdsp: Fix: runtime error: signed integer overflow: -1027555328 + -1226681270 cannot be represented in type 'int'

Fixes: 673/clusterfuzz-testcase-5948736536576000

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavcodec/flacdsp.c b/libavcodec/flacdsp.c
index 560091f..bc9a5db 100644
--- a/libavcodec/flacdsp.c
+++ b/libavcodec/flacdsp.c
@@ -67,7 +67,7 @@ static void flac_lpc_16_c(int32_t *decoded, const int coeffs[32],
         int sum = 0;
         for (j = 0; j < pred_order; j++)
             sum += coeffs[j] * (SUINT)decoded[j];
-        decoded[j] += sum >> qlevel;
+        decoded[j] = decoded[j] + (unsigned)(sum >> qlevel);
     }
 }
 



More information about the ffmpeg-cvslog mailing list