Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-01-18 21:55:23 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2020-02-10 01:33:18 +0300
commitb8a0be93528187721a2414f66abbc252a258afa3 (patch)
tree0d447e4870381b0e1e9f3efa91a248b7642d2306 /libavcodec/wmalosslessdec.c
parent5584c0bb945d6010a9d8c22ef3270792022e1761 (diff)
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>
Diffstat (limited to 'libavcodec/wmalosslessdec.c')
-rw-r--r--libavcodec/wmalosslessdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index d841ec256a..8885487980 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -992,7 +992,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);
}
}
}