aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-09-22 20:45:27 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-09-25 11:10:33 +0200
commitf1a272b7b4883ee30f71653ab33f8a6c201803bc (patch)
tree16346ee8efec50223fea787ce689186d9d235c7a
parent48e14c4de099b103311044d406de843cf6df3542 (diff)
downloadffmpeg-f1a272b7b4883ee30f71653ab33f8a6c201803bc.tar.gz
avcodec/takdec: Fix integer overflow in decode_lpc()
Fixes: runtime error: signed integer overflow: 16748560 + 2143729712 cannot be represented in type 'int' Fixes: 3202/clusterfuzz-testcase-minimized-4988291642294272 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 5d31f03a0264cac24434c8108daef4ccba6d28f9) 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 886ca8a27f..738f1e4a4b 100644
--- a/libavcodec/takdec.c
+++ b/libavcodec/takdec.c
@@ -192,7 +192,7 @@ static void decode_lpc(int32_t *coeffs, int mode, int length)
int a1 = *coeffs++;
for (i = 0; i < length - 1 >> 1; i++) {
*coeffs += a1;
- coeffs[1] += *coeffs;
+ coeffs[1] += (unsigned)*coeffs;
a1 = coeffs[1];
coeffs += 2;
}