diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-06-19 23:27:21 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-11-11 20:18:46 +0100 |
commit | 18a05c2acdb8e4c15f68ffdb781f7f8335f3f70e (patch) | |
tree | 7841472710f096f75948f98084e7119d05223f2c | |
parent | 268dfc0dd52ea524235f144b4be8ba4087092b90 (diff) | |
download | ffmpeg-18a05c2acdb8e4c15f68ffdb781f7f8335f3f70e.tar.gz |
avcodec/alsdec: Fix integer overflow with shifting samples
Fixes: signed integer overflow: -346039050 * 8 cannot be represented in type 'int'
Fixes: 15283/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5692700268953600
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a3bd4b260eb9f0d5817f9b3d672844f127c51a0b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/alsdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index e54440910c..420bcf835a 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -1033,7 +1033,7 @@ static int decode_block(ALSDecContext *ctx, ALSBlockData *bd) if (*bd->shift_lsbs) for (smp = 0; smp < bd->block_length; smp++) - bd->raw_samples[smp] <<= *bd->shift_lsbs; + bd->raw_samples[smp] = (unsigned)bd->raw_samples[smp] << *bd->shift_lsbs; return 0; } |