[FFmpeg-cvslog] avcodec/audiodsp: Fix integer overflow in scalarproduct_int16_c()

Michael Niedermayer git at videolan.org
Fri Apr 24 02:14:40 EEST 2020


ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Sun Feb  2 20:02:55 2020 +0100| [9a82db1ce90765e4610432ecadffc5260bf4aa04] | committer: Michael Niedermayer

avcodec/audiodsp: Fix integer overflow in scalarproduct_int16_c()

Fixes: signed integer overflow: 2145417478 + 76702564 cannot be represented in type 'int'
Fixes: 20313/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RA_144_fuzzer-5734487724130304

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

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

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

diff --git a/libavcodec/audiodsp.c b/libavcodec/audiodsp.c
index 85b5a74947..3a60c2c91d 100644
--- a/libavcodec/audiodsp.c
+++ b/libavcodec/audiodsp.c
@@ -79,7 +79,7 @@ static void vector_clipf_c(float *dst, const float *src,
 static int32_t scalarproduct_int16_c(const int16_t *v1, const int16_t *v2,
                                      int order)
 {
-    int res = 0;
+    unsigned res = 0;
 
     while (order--)
         res += *v1++ **v2++;



More information about the ffmpeg-cvslog mailing list