diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-07 23:07:42 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-14 00:21:49 +0200 |
commit | e397902d47ebe685b4f79d3837eba8be9beaaa4b (patch) | |
tree | d97a375c0ec14364790e47c7954e7975b8c3feb8 | |
parent | edb8d29ca5fef83ab7a89f24fe23411c0f4f8f0d (diff) | |
download | ffmpeg-e397902d47ebe685b4f79d3837eba8be9beaaa4b.tar.gz |
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/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8b1f66cf5c2e4d29ae06cdf3f12cdd3d808006bd)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/wmv2dsp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/wmv2dsp.c b/libavcodec/wmv2dsp.c index 162ac92a72..7a3a851861 100644 --- a/libavcodec/wmv2dsp.c +++ b/libavcodec/wmv2dsp.c @@ -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; |