diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-28 03:13:24 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-17 20:35:19 +0200 |
commit | 250d2b402a0e31d169cc849575e27d61324b0c5a (patch) | |
tree | b14bb4c3078b50a1c8aa6e31dbd2012e40e30df0 | |
parent | e8fb38f48cb6883b0df7905f2fe185f1d7fbf262 (diff) | |
download | ffmpeg-250d2b402a0e31d169cc849575e27d61324b0c5a.tar.gz |
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>
(cherry picked from commit 4bd3f1ce3e68a9348e97ec07a247048ea72ed808)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/h264_direct.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c index 5f66a67d89..2660cb80d3 100644 --- a/libavcodec/h264_direct.c +++ b/libavcodec/h264_direct.c @@ -613,7 +613,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, |