aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-15 21:21:20 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-17 20:35:20 +0200
commitcd4674f608b6dca14ceb8ef1aa1611fc931b1e03 (patch)
tree470b60c121a4b46f9b29125a33606df6e2965508 /libavcodec
parent55d320ddf850fc720720825cc7cee72b866c8cd7 (diff)
downloadffmpeg-cd4674f608b6dca14ceb8ef1aa1611fc931b1e03.tar.gz
avcodec/svq3: Fix runtime error: left shift of negative value -6
Fixes: 1604/clusterfuzz-testcase-minimized-5312060206350336 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 a6eb006ad47beb6d5e5cc2c99f8185965209ec6b) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/svq3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index 0d63736007..e05cab5a04 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -397,8 +397,8 @@ static inline int svq3_mc_dir(SVQ3Context *s, int size, int mode,
if (mode != PREDICT_MODE) {
pred_motion(h, sl, k, part_width >> 2, dir, 1, &mx, &my);
} else {
- mx = s->next_pic->motion_val[0][b_xy][0] << 1;
- my = s->next_pic->motion_val[0][b_xy][1] << 1;
+ mx = s->next_pic->motion_val[0][b_xy][0] * 2;
+ my = s->next_pic->motion_val[0][b_xy][1] * 2;
if (dir == 0) {
mx = mx * h->frame_num_offset /