summaryrefslogtreecommitdiff
path: root/libavcodec/h264_direct.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-02-28 03:13:24 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-03-01 14:07:33 +0100
commit4bd3f1ce3e68a9348e97ec07a247048ea72ed808 (patch)
treef34f8b9dc4b39ada1f231430d6dbc74365a89b3e /libavcodec/h264_direct.c
parent2c00b373024054e0779ef67fc54b763d624db3e8 (diff)
avcodec/h264_direct: Fix runtime error: left shift of negative value -14
Fixes: 682/clusterfuzz-testcase-4799120021651456 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/h264_direct.c')
-rw-r--r--libavcodec/h264_direct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c
index 107c905db1..cbb84665b3 100644
--- a/libavcodec/h264_direct.c
+++ b/libavcodec/h264_direct.c
@@ -614,7 +614,7 @@ single_col:
{
const int16_t *mv_col = l1mv[x8 * 3 + y8 * b4_stride];
- int my_col = (mv_col[1] << y_shift) / 2;
+ int my_col = (mv_col[1] * (1 << y_shift)) / 2;
int mx = (scale * mv_col[0] + 128) >> 8;
int my = (scale * my_col + 128) >> 8;
fill_rectangle(&sl->mv_cache[0][scan8[i8 * 4]], 2, 2, 8,