summaryrefslogtreecommitdiff
path: root/libavcodec/dca_xll.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-02-20 20:22:26 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-02-21 00:40:20 +0100
commite04108dfa6d13d171b0e1b5646cc10ce51050bed (patch)
treeaf8cc5680f76f1c7674d3052c859ca3f475bfd92 /libavcodec/dca_xll.c
parent4614bf2caf67a89c2d833b3368f325eab54582bc (diff)
avcodec/dca_xll: signed integer overflow: 255251 * 32768 cannot be represented in type 'int'
Fixes: 627/clusterfuzz-testcase-5020897033322496 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/dca_xll.c')
-rw-r--r--libavcodec/dca_xll.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/dca_xll.c b/libavcodec/dca_xll.c
index 1320aaf28f..435f84ed7e 100644
--- a/libavcodec/dca_xll.c
+++ b/libavcodec/dca_xll.c
@@ -1446,11 +1446,11 @@ int ff_dca_xll_filter_frame(DCAXllDecoder *s, AVFrame *frame)
if (frame->format == AV_SAMPLE_FMT_S16P) {
int16_t *plane = (int16_t *)frame->extended_data[i];
for (k = 0; k < nsamples; k++)
- plane[k] = av_clip_int16(samples[k] * (1 << shift));
+ plane[k] = av_clip_int16(samples[k] * (SUINT)(1 << shift));
} else {
int32_t *plane = (int32_t *)frame->extended_data[i];
for (k = 0; k < nsamples; k++)
- plane[k] = clip23(samples[k] * (1 << shift)) * (1 << 8);
+ plane[k] = clip23(samples[k] * (SUINT)(1 << shift)) * (1 << 8);
}
}