summaryrefslogtreecommitdiff
path: root/libavcodec/celp_filters.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-23 14:50:55 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-23 16:11:27 +0200
commitfb75ad79cb8a00d42857b252e0049a0bbe90da66 (patch)
tree1b44a3746f2e39dd902b0d029cae0faca736b70f /libavcodec/celp_filters.c
parent948b54763b6c851b2a0bec6702cd9c419065fdb6 (diff)
downloadffmpeg-fb75ad79cb8a00d42857b252e0049a0bbe90da66.tar.gz
avcodec/celp_filters: Fix runtime error: signed integer overflow: 1892453989 + 381702783 cannot be represented in type 'int'
Fixes: 1766/clusterfuzz-testcase-minimized-6562020075765760 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/celp_filters.c')
-rw-r--r--libavcodec/celp_filters.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/celp_filters.c b/libavcodec/celp_filters.c
index a81fd8831b..fafedd99a3 100644
--- a/libavcodec/celp_filters.c
+++ b/libavcodec/celp_filters.c
@@ -67,7 +67,7 @@ int ff_celp_lp_synthesis_filter(int16_t *out, const int16_t *filter_coeffs,
for (n = 0; n < buffer_length; n++) {
int sum = -rounder, sum1;
for (i = 1; i <= filter_length; i++)
- sum += filter_coeffs[i-1] * out[n-i];
+ sum += (unsigned)(filter_coeffs[i-1] * out[n-i]);
sum1 = ((-sum >> 12) + in[n]) >> shift;
sum = av_clip_int16(sum1);