[FFmpeg-cvslog] avcodec/dcadsp: Fix runtime error: signed integer overflow: 394625024 * 8 cannot be represented in type 'int'

Michael Niedermayer git at videolan.org
Wed Feb 22 03:45:30 EET 2017


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Wed Feb 22 01:11:11 2017 +0100| [92188c8f57bf02a564c17f7994c8434a2f3893fe] | committer: Michael Niedermayer

avcodec/dcadsp: Fix runtime error: signed integer overflow: 394625024 * 8 cannot be represented in type 'int'

Fixes: 643/clusterfuzz-testcase-5209078743695360

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

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

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

diff --git a/libavcodec/dcadsp.c b/libavcodec/dcadsp.c
index 1cd2e4e..3d637f6 100644
--- a/libavcodec/dcadsp.c
+++ b/libavcodec/dcadsp.c
@@ -300,7 +300,7 @@ static void decor_c(int32_t *dst, const int32_t *src, int coeff, ptrdiff_t len)
     int i;
 
     for (i = 0; i < len; i++)
-        dst[i] += src[i] * coeff + (1 << 2) >> 3;
+        dst[i] += (int)(src[i] * (SUINT)coeff + (1 << 2)) >> 3;
 }
 
 static void dmix_sub_xch_c(int32_t *dst1, int32_t *dst2,



More information about the ffmpeg-cvslog mailing list