diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-21 00:11:19 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-21 00:40:20 +0100 |
commit | e8a3498f2452ba2be605b1ffb5974143095aacf1 (patch) | |
tree | e52a608519ee2065ed8362482c93e4ae9210e7f0 /libavcodec | |
parent | 0a65dae9d0c01730323695fdc45eb1c1f5a978f7 (diff) | |
download | ffmpeg-e8a3498f2452ba2be605b1ffb5974143095aacf1.tar.gz |
avcodec/dca_xll: Fix runtime error: signed integer overflow: -1073741824 * 32768 cannot be represented in type 'int'
Fixes: 629/clusterfuzz-testcase-6697457381539840
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')
-rw-r--r-- | libavcodec/dca_xll.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/dca_xll.c b/libavcodec/dca_xll.c index 435f84ed7e..3dfde6b68d 100644 --- a/libavcodec/dca_xll.c +++ b/libavcodec/dca_xll.c @@ -717,10 +717,10 @@ static void chs_assemble_msbs_lsbs(DCAXllDecoder *s, DCAXllChSet *c, int band) int32_t *lsb = b->lsb_sample_buffer[ch]; int adj = b->bit_width_adjust[ch]; for (n = 0; n < nsamples; n++) - msb[n] = msb[n] * (1 << shift) + (lsb[n] << adj); + msb[n] = msb[n] * (SUINT)(1 << shift) + (lsb[n] << adj); } else { for (n = 0; n < nsamples; n++) - msb[n] = msb[n] * (1 << shift); + msb[n] = msb[n] * (SUINT)(1 << shift); } } } |