aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-01-18 19:55:23 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-01 12:49:26 +0200
commit1a54ee4a51220d87d7b2ed92a682883cd2bb2b51 (patch)
tree2b056e33f085951fb51015cd13c0ef857884711e /libavcodec
parent44da920eb70a5a56c5ad9a0becd33b97cf1e856c (diff)
downloadffmpeg-1a54ee4a51220d87d7b2ed92a682883cd2bb2b51.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>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/wmalosslessdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index ea5a333860..263be2065e 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -996,7 +996,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);
}
}
}