aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-02-19 18:47:13 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-08-23 13:15:16 +0200
commitac73d88fbc016db49def3b01250e17a7375b2952 (patch)
treee85e751a091b2005eb85eacdc15c4ab305cc829f
parent42ff6897cae801ed7feb3ce1712596a1d09eb940 (diff)
downloadffmpeg-ac73d88fbc016db49def3b01250e17a7375b2952.tar.gz
avcodec/mpeg12dec: Fix runtime error: left shift of negative value
Fixes: 608/clusterfuzz-testcase-603978286392934 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 706757d26dd5e606c1745a4bb53fe45f6d6493cf) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/mpeg12dec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 5fb4739cca..62aaec1424 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -917,8 +917,8 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64])
s->last_mv[i][0][1]);
/* full_pel: only for MPEG-1 */
if (s->full_pel[i]) {
- s->mv[i][0][0] <<= 1;
- s->mv[i][0][1] <<= 1;
+ s->mv[i][0][0] *= 2;
+ s->mv[i][0][1] *= 2;
}
}
}