aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-08-04 17:20:45 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-11-15 12:25:45 +0100
commit0f11aa263e90f10f0611667d2df29e345512e99d (patch)
treee85a543b49d372e1f3ec45df2ad54583cc1c92c3
parent5a16b294ed91aa0aef42dcfd38677065002668e5 (diff)
downloadffmpeg-0f11aa263e90f10f0611667d2df29e345512e99d.tar.gz
avcodec/ralf: Fix integer overflow in apply_lpc()
Fixes: signed integer overflow: 1603085316 + 1238786562 cannot be represented in type 'int' Fixes: 16203/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-5086088934195200 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 ccca484324e04dff4cb81d0f9018ae828e6b5c89) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/ralf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ralf.c b/libavcodec/ralf.c
index 3f7953c6db..0d6b57d652 100644
--- a/libavcodec/ralf.c
+++ b/libavcodec/ralf.c
@@ -323,7 +323,7 @@ static void apply_lpc(RALFContext *ctx, int ch, int length, int bits)
acc = 0;
for (j = 0; j < flen; j++)
- acc += ctx->filter[j] * audio[i - j - 1];
+ acc += (unsigned)ctx->filter[j] * audio[i - j - 1];
if (acc < 0) {
acc = (acc + bias - 1) >> ctx->filter_bits;
acc = FFMAX(acc, min_clip);