diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-01-18 19:55:23 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-03 12:10:23 +0200 |
commit | 52b9e7f530f88a73f6c5d96d9a38c75631294c38 (patch) | |
tree | f719a9e3b640320e6de8f696fcc1c084edaa7389 | |
parent | 3653108a5c1abe8a0dc8a0e4b7124475c1a5728e (diff) | |
download | ffmpeg-52b9e7f530f88a73f6c5d96d9a38c75631294c38.tar.gz |
avcodec/wmalosslessdec: Fix integer overflow with sliding in padding bits
Fixes: signed integer overflow: -53716100 * 256 cannot be represented in type 'int'
Fixes: 20143/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5716604000403456
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 b8a0be93528187721a2414f66abbc252a258afa3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/wmalosslessdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index b3446cf49a..c02b156f0f 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -995,7 +995,7 @@ static int decode_subframe(WmallDecodeCtx *s) if (s->bits_per_sample == 16) { *s->samples_16[c]++ = (int16_t) s->channel_residues[c][j] * (1 << padding_zeroes); } else { - *s->samples_32[c]++ = s->channel_residues[c][j] * (256 << padding_zeroes); + *s->samples_32[c]++ = s->channel_residues[c][j] * (256U << padding_zeroes); } } } |