aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-06-22 21:21:56 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-23 03:05:43 +0200
commit00a6211b458a48fbd235cc6c808861a0e337756e (patch)
tree2ba2c734caedc4d6ba075975dbaeef89bd4ba2a0
parent220ee7e58369b0d6f3adf97242034f315b9a9d96 (diff)
downloadffmpeg-00a6211b458a48fbd235cc6c808861a0e337756e.tar.gz
avcodec/takdec: Fix integer overflow
Fixes: runtime error: signed integer overflow: 512 + 2147483146 cannot be represented in type 'int' Fixes: 2314/clusterfuzz-testcase-minimized-4519333877252096 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 0c2ef4f6b4d52a7b7184c747ffea3576926ea1b1) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/takdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c
index f25cd7a031..bdb6d21370 100644
--- a/libavcodec/takdec.c
+++ b/libavcodec/takdec.c
@@ -483,7 +483,7 @@ static int decode_subframe(TAKDecContext *s, int32_t *decoded,
int v = 1 << (filter_quant - 1);
if (filter_order & -16)
- v += s->adsp.scalarproduct_int16(&s->residues[i], s->filter,
+ v += (unsigned)s->adsp.scalarproduct_int16(&s->residues[i], s->filter,
filter_order & -16);
for (j = filter_order & -16; j < filter_order; j += 4) {
v += s->residues[i + j + 3] * s->filter[j + 3] +