Commit 8b1f66cf authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/wmv2dsp: Fix runtime error: signed integer overflow: 181 * -12156865...

avcodec/wmv2dsp: Fix runtime error: signed integer overflow: 181 * -12156865 cannot be represented in type 'int'

Fixes: 1401/clusterfuzz-testcase-minimized-6526248148795392

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 3c3d4ce4
......@@ -78,8 +78,8 @@ static void wmv2_idct_col(short * b)
a4 = (W0 * b[8 * 0] - W0 * b[8 * 4] ) >> 3;
/* step 2 */
s1 = (181 * (a1 - a5 + a7 - a3) + 128) >> 8;
s2 = (181 * (a1 - a5 - a7 + a3) + 128) >> 8;
s1 = (int)(181U * (a1 - a5 + a7 - a3) + 128) >> 8;
s2 = (int)(181U * (a1 - a5 - a7 + a3) + 128) >> 8;
/* step 3 */
b[8 * 0] = (a0 + a2 + a1 + a5 + (1 << 13)) >> 14;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment