[FFmpeg-cvslog] avcodec/takdec: Fix integer overflow in decode_lpc()
Michael Niedermayer
git at videolan.org
Thu Feb 1 01:50:33 EET 2018
ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Fri Sep 22 20:45:27 2017 +0200| [13d16a7b9963a0fd750c608d8eaf4c903ec0ee2b] | committer: Michael Niedermayer
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 at niedermayer.cc>
(cherry picked from commit 5d31f03a0264cac24434c8108daef4ccba6d28f9)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=13d16a7b9963a0fd750c608d8eaf4c903ec0ee2b
---
libavcodec/takdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c
index e34d773056..dfedb67dfc 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;
}
More information about the ffmpeg-cvslog
mailing list