diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-09-22 20:45:27 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-09-25 11:10:30 +0200 |
commit | 2c84969cb4aef2526e11d070af5c300b5b4e3818 (patch) | |
tree | 4f1a9f0b65f9308cd771ad5bec78f374495bbd04 | |
parent | 09913c5ec4cc03fbcf1dcebed00b148f41ed2aba (diff) | |
download | ffmpeg-2c84969cb4aef2526e11d070af5c300b5b4e3818.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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c index e6867eb1b9..b494c5888d 100644 --- a/libavcodec/takdec.c +++ b/libavcodec/takdec.c @@ -195,7 +195,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; } |