avcodec/mpeg12dec: check for overread in mpeg1_fast_decode_block_inter()

No speedloss meassured

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/54/head
Michael Niedermayer 11 years ago
parent 746350ea0f
commit 0a59055167
  1. 2
      libavcodec/mpeg12dec.c

@ -335,7 +335,7 @@ static inline int mpeg1_fast_decode_block_inter(MpegEncContext *s, int16_t *bloc
}
block[j] = level;
if (((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
if (((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF || i >= 64)
break;
UPDATE_CACHE(re, &s->gb);
}

Loading…
Cancel
Save