[FFmpeg-cvslog] avcodec/takdec: Fix integer overflow
Michael Niedermayer
git at videolan.org
Tue Aug 1 15:41:59 EEST 2017
ffmpeg | branch: release/3.1 | Michael Niedermayer <michael at niedermayer.cc> | Thu Jun 22 21:21:56 2017 +0200| [10a085a21f2da353652d67f17292b24fbd9fd67a] | committer: Michael Niedermayer
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 at niedermayer.cc>
(cherry picked from commit 0c2ef4f6b4d52a7b7184c747ffea3576926ea1b1)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=10a085a21f2da353652d67f17292b24fbd9fd67a
---
libavcodec/takdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c
index cc5623e0ca..c4c4b30aba 100644
--- a/libavcodec/takdec.c
+++ b/libavcodec/takdec.c
@@ -481,7 +481,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] +
More information about the ffmpeg-cvslog
mailing list