[FFmpeg-cvslog] avcodec/wavarc: fix signed integer overflow in block type 6/19

Michael Niedermayer git at videolan.org
Sun Apr 14 04:45:14 EEST 2024


ffmpeg | branch: release/6.1 | Michael Niedermayer <michael at niedermayer.cc> | Thu Apr  4 00:15:27 2024 +0200| [b94d2dd59a217ab224a3a54d4f9d5e362eb284eb] | committer: Michael Niedermayer

avcodec/wavarc: fix signed integer overflow in block type 6/19

Fixes: signed integer overflow: -2088796289 + -91276551 cannot be represented in type 'int'
Fixes: 67772/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVARC_fuzzer-6533568953122816

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 28c7094b25b689185155a6833caf2747b94774a4)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b94d2dd59a217ab224a3a54d4f9d5e362eb284eb
---

 libavcodec/wavarc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/wavarc.c b/libavcodec/wavarc.c
index aa1af6330b..e121f1bc61 100644
--- a/libavcodec/wavarc.c
+++ b/libavcodec/wavarc.c
@@ -648,7 +648,7 @@ static int decode_5elp(AVCodecContext *avctx,
                 for (int o = 0; o < order; o++)
                     sum += s->filter[ch][o] * (unsigned)samples[n + 70 - o - 1];
 
-                samples[n + 70] += ac_out[n] + (sum >> 4);
+                samples[n + 70] += ac_out[n] + (unsigned)(sum >> 4);
             }
 
             for (int n = 0; n < 70; n++)



More information about the ffmpeg-cvslog mailing list