diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-03-12 03:04:04 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-08-23 13:15:16 +0200 |
commit | 570826b6323592fb1b78b1f790165b8cc4e2648b (patch) | |
tree | 24acd34b99020f67db6ade53aae9009b2b6153f4 | |
parent | f46482f00c295b499d971dd5928f1990c10881b7 (diff) | |
download | ffmpeg-570826b6323592fb1b78b1f790165b8cc4e2648b.tar.gz |
avcodec/mpeg12dec: Fix runtime error: left shift of negative value -1
Fixes: 764/clusterfuzz-testcase-6273034652483584
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 a720b854b0d3f0fae2b1eac644dd39e5821cacb1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/mpeg12dec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 62aaec1424..07efd6afa9 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -1046,7 +1046,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64]) cbp = get_vlc2(&s->gb, ff_mb_pat_vlc.table, MB_PAT_VLC_BITS, 1); if (mb_block_count > 6) { - cbp <<= mb_block_count - 6; + cbp *= 1 << mb_block_count - 6; cbp |= get_bits(&s->gb, mb_block_count - 6); s->bdsp.clear_blocks(s->block[6]); } |