avcodec/mpeg12dec: Fix runtime error: left shift of negative value -13

Fixes: 709/clusterfuzz-testcase-4789836449841152

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/230/merge
Michael Niedermayer 8 years ago
parent ab998f4c7f
commit d757ddbaab
  1. 2
      libavcodec/mpeg12dec.c

@ -497,7 +497,7 @@ static inline int mpeg2_decode_block_intra(MpegEncContext *s,
dc = s->last_dc[component]; dc = s->last_dc[component];
dc += diff; dc += diff;
s->last_dc[component] = dc; s->last_dc[component] = dc;
block[0] = dc << (3 - s->intra_dc_precision); block[0] = dc * (1 << (3 - s->intra_dc_precision));
ff_tlog(s->avctx, "dc=%d\n", block[0]); ff_tlog(s->avctx, "dc=%d\n", block[0]);
mismatch = block[0] ^ 1; mismatch = block[0] ^ 1;
i = 0; i = 0;

Loading…
Cancel
Save