You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/wmalosslessdec: Fix integer overflow in mclms_predict()
Fixes: signed integer overflow: 2147483636 + 2048 cannot be represented in type 'int' Fixes: 22016/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5109395618004992 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:
@@ -676,7 +676,7 @@ static void mclms_predict(WmallDecodeCtx *s, int icoef, int *pred)
|
|||||||
for (i = 0; i < ich; i++)
|
for (i = 0; i < ich; i++)
|
||||||
pred[ich] += (uint32_t)s->channel_residues[i][icoef] *
|
pred[ich] += (uint32_t)s->channel_residues[i][icoef] *
|
||||||
s->mclms_coeffs_cur[i + num_channels * ich];
|
s->mclms_coeffs_cur[i + num_channels * ich];
|
||||||
pred[ich] += (1 << s->mclms_scaling) >> 1;
|
pred[ich] += (1U << s->mclms_scaling) >> 1;
|
||||||
pred[ich] >>= s->mclms_scaling;
|
pred[ich] >>= s->mclms_scaling;
|
||||||
s->channel_residues[ich][icoef] += (unsigned)pred[ich];
|
s->channel_residues[ich][icoef] += (unsigned)pred[ich];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user