aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vc1_block.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-09-10 17:39:45 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-12-06 20:30:57 +0100
commite5796aa1b97a9255da9b38f3d3b8610e1bf160de (patch)
tree7e12b4a03cfe8b16d1ed40120f935bfb7cd10056 /libavcodec/vc1_block.c
parentbdacbbba69c8272b2c94aa227272feaf4d2b1591 (diff)
downloadffmpeg-e5796aa1b97a9255da9b38f3d3b8610e1bf160de.tar.gz
avcodec/vc1_block: Fix invalid shift with rangeredfrm
Fixes: left shift of negative value -7 Fixes: 16959/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV3_fuzzer-5200360825683968 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 c722a69253a280b86b1d2a4ca00c89345a796781) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/vc1_block.c')
-rw-r--r--libavcodec/vc1_block.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c
index 9b12944d7d..1aa01641c7 100644
--- a/libavcodec/vc1_block.c
+++ b/libavcodec/vc1_block.c
@@ -1978,7 +1978,7 @@ static void vc1_decode_b_mb(VC1Context *v)
v->vc1dsp.vc1_inv_trans_8x8(s->block[i]);
if (v->rangeredfrm)
for (j = 0; j < 64; j++)
- s->block[i][j] <<= 1;
+ s->block[i][j] *= 2;
s->idsp.put_signed_pixels_clamped(s->block[i],
s->dest[dst_idx] + off,
i & 4 ? s->uvlinesize