aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/wavarc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-04-04 00:15:27 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2024-04-04 19:38:28 +0200
commit28c7094b25b689185155a6833caf2747b94774a4 (patch)
tree84c256288a0d80efaaae54ca7d1654322b9fc23d /libavcodec/wavarc.c
parent3db674614d52577dc844df34d11e7aa617923ae6 (diff)
downloadffmpeg-28c7094b25b689185155a6833caf2747b94774a4.tar.gz
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@niedermayer.cc>
Diffstat (limited to 'libavcodec/wavarc.c')
-rw-r--r--libavcodec/wavarc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wavarc.c b/libavcodec/wavarc.c
index 7083494cd8..b4b26958e6 100644
--- a/libavcodec/wavarc.c
+++ b/libavcodec/wavarc.c
@@ -647,7 +647,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++)