aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer2019-11-29 22:45:07 +0100
committerMichael Niedermayer2019-12-31 19:51:57 +0100
commit525a8ee3d878b50e6e6cd70dc7c79324bfec48c6 (patch)
treec4ff45802af047fd2eac5a0831c28f57941a6231
parent9bea771035cf3e46daade2dd12883e4f06b6d370 (diff)
avcodec/wmalosslessdec: Fixes undefined overflow in dequantization in decode_subframe()
Fixes: signed integer overflow: 47875596 * 45 cannot be represented in type 'int' Fixes: 19082/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5687766512041984 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 53efab44a9d0971c6c12d9b3d1af855ca863c847) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/wmalosslessdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index 7de93f241f..d47fd89c52 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -979,7 +979,7 @@ static int decode_subframe(WmallDecodeCtx *s)
if (s->quant_stepsize != 1)
for (i = 0; i < s->num_channels; i++)
for (j = 0; j < subframe_len; j++)
- s->channel_residues[i][j] *= s->quant_stepsize;
+ s->channel_residues[i][j] *= (unsigned)s->quant_stepsize;
}
/* Write to proper output buffer depending on bit-depth */