Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-09-22 21:45:27 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2017-09-25 12:10:29 +0300
commit27505de3b9fe75a749a6c3c91f66fe1bc404e51c (patch)
tree93adce1e4517cd0483c41a81365e6da2b06031ef
parentdc5240a4d797cb8c89112e248cfcab92e749a0c0 (diff)
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 76814b4511..b422dd1b07 100644
--- a/libavcodec/takdec.c
+++ b/libavcodec/takdec.c
@@ -204,7 +204,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;
}