Commit e04108df authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 4614bf2c
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment