diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-22 01:11:11 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-22 02:42:48 +0100 |
commit | 92188c8f57bf02a564c17f7994c8434a2f3893fe (patch) | |
tree | 895c28e7ded1bfe7e75e27e272a8a7313aa8ec2f | |
parent | 24f6559bd2417b30c848d27523c88949d537a83c (diff) | |
download | ffmpeg-92188c8f57bf02a564c17f7994c8434a2f3893fe.tar.gz |
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>
-rw-r--r-- | libavcodec/dcadsp.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, |