Browse Source

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 a720b854b0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.2.5
Michael Niedermayer 9 years ago
parent
commit
3dd0166bde
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/mpeg12dec.c

+ 1
- 1
libavcodec/mpeg12dec.c View File

@@ -994,7 +994,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]);
}


Loading…
Cancel
Save