aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-01-30 19:09:36 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2021-09-11 21:23:49 +0200
commite7da859daab2a9948e59f96e00b30bc0e969a71f (patch)
treee0e3609e97a11b48abeeb2c3f64c3902a4f3492a
parent89e3962271d0f703f226de8d827f62e79def32e0 (diff)
downloadffmpeg-e7da859daab2a9948e59f96e00b30bc0e969a71f.tar.gz
avcodec/dcadsp: Fix integer overflow in dmix_add_c()
Fixes: signed integer overflow: 1515225320 + 759416059 cannot be represented in type 'int' Fixes: 29256/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DCA_fuzzer-5719088561258496 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 b4ebf483bcbf2e5db6bd29607142741f62598b4e) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/dcadsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dcadsp.c b/libavcodec/dcadsp.c
index fade1a6c02..f97874fbe6 100644
--- a/libavcodec/dcadsp.c
+++ b/libavcodec/dcadsp.c
@@ -328,7 +328,7 @@ static void dmix_add_c(int32_t *dst, const int32_t *src, int coeff, ptrdiff_t le
int i;
for (i = 0; i < len; i++)
- dst[i] += mul15(src[i], coeff);
+ dst[i] += (unsigned)mul15(src[i], coeff);
}
static void dmix_scale_c(int32_t *dst, int scale, ptrdiff_t len)