summaryrefslogtreecommitdiff
path: root/libavcodec/dcadsp.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-02-26 20:28:02 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-02-28 01:13:52 +0100
commit949d2176ef0a37c6ecbb65be0f1199536a2d9278 (patch)
treec24d25eb922028a112ed9385dd2ceaed6fb6172c /libavcodec/dcadsp.c
parent63e400a8807dca7b0ffa3841df2e31f7419abb8d (diff)
downloadffmpeg-949d2176ef0a37c6ecbb65be0f1199536a2d9278.tar.gz
avcodec/dca: Fix multiple runtime error: signed integer overflow
Fixes: 680/clusterfuzz-testcase-5416627266912256 Fixes: 681/clusterfuzz-testcase-5013323462475776 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/dcadsp.c')
-rw-r--r--libavcodec/dcadsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dcadsp.c b/libavcodec/dcadsp.c
index 3d637f63ae..1503d00886 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] += (int)(src[i] * (SUINT)coeff + (1 << 2)) >> 3;
+ dst[i] += (SUINT)((int)(src[i] * (SUINT)coeff + (1 << 2)) >> 3);
}
static void dmix_sub_xch_c(int32_t *dst1, int32_t *dst2,