aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpeg12dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-02-25 21:07:24 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-02-26 17:16:22 +0100
commitaff8cf18cb0b1fa4f2e3d163c3da2f25aa6d1906 (patch)
tree6243d41563f477748678f7ffafc2063fdfda05cc /libavcodec/mpeg12dec.c
parent0716bcce5bdc6299da2966f34cb62eba3f709be8 (diff)
downloadffmpeg-aff8cf18cb0b1fa4f2e3d163c3da2f25aa6d1906.tar.gz
avcodec/mpeg12dec: Fix runtime error: left shift of negative value -2
671/clusterfuzz-testcase-4990381827555328 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/mpeg12dec.c')
-rw-r--r--libavcodec/mpeg12dec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 5f86029660..d44ddb20fa 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -948,8 +948,8 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64])
dmy = get_dmv(s);
- s->last_mv[i][0][1] = my << my_shift;
- s->last_mv[i][1][1] = my << my_shift;
+ s->last_mv[i][0][1] = my * (1 << my_shift);
+ s->last_mv[i][1][1] = my * (1 << my_shift);
s->mv[i][0][0] = mx;
s->mv[i][0][1] = my;