From 92188c8f57bf02a564c17f7994c8434a2f3893fe Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 22 Feb 2017 01:11:11 +0100 Subject: 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 --- libavcodec/dcadsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/dcadsp.c') diff --git a/libavcodec/dcadsp.c b/libavcodec/dcadsp.c index 1cd2e4eddf..3d637f63ae 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, -- cgit v1.2.3