mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 03:59:43 +00:00
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>
This commit is contained in:
parent
5584c0bb94
commit
b8a0be9352
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user