[FFmpeg-devel] [PATCH 5/6] avcodec/interplayacm: Fix integer overflows in juggle()

Michael Niedermayer michael at niedermayer.cc
Mon Oct 7 19:39:21 EEST 2019


Fixes: signed integer overflow: -760459023 + -1520918047 cannot be represented in type 'int'
Fixes: 17994/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INTERPLAY_ACM_fuzzer-5647123042795520

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavcodec/interplayacm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/interplayacm.c b/libavcodec/interplayacm.c
index 5639d8de82..cff79eb6b2 100644
--- a/libavcodec/interplayacm.c
+++ b/libavcodec/interplayacm.c
@@ -435,7 +435,8 @@ static int fill_block(InterplayACMContext *s)
 static void juggle(int *wrap_p, int *block_p, unsigned sub_len, unsigned sub_count)
 {
     unsigned i, j;
-    int *p, r0, r1, r2, r3;
+    int *p;
+    unsigned int r0, r1, r2, r3;
 
     for (i = 0; i < sub_len; i++) {
         p = block_p;
-- 
2.23.0



More information about the ffmpeg-devel mailing list