aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-02-02 20:02:55 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-01 13:33:44 +0200
commitc298f94143bf308119fbe1e895d2ac8c6d893862 (patch)
tree8cbd20eb9bd7dded18c7e4b421ab3ba51d15bc74 /libavcodec
parentb26458b046b42f8baf65a990e98d50d329314621 (diff)
downloadffmpeg-c298f94143bf308119fbe1e895d2ac8c6d893862.tar.gz
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@niedermayer.cc> (cherry picked from commit abb5762e985f4ce34e97c1b2fa6d1108ce8a881f) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/audiodsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/audiodsp.c b/libavcodec/audiodsp.c
index 3c7a3a7583..efcb0a8e8a 100644
--- a/libavcodec/audiodsp.c
+++ b/libavcodec/audiodsp.c
@@ -79,7 +79,7 @@ static void vector_clipf_c(float *dst, const float *src, int len,
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++;