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@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2017-02-22 01:11:11 +01:00
parent 24f6559bd2
commit 92188c8f57

View File

@ -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,