Browse Source

mpeg12: check for available bits to avoid an infinite loop

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
tags/n0.10
Jindřich Makovička Diego Biurrun 13 years ago
parent
commit
a85ce653fb
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/mpeg12.c

+ 1
- 1
libavcodec/mpeg12.c View File

@@ -1658,7 +1658,7 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y,
if (mb_y == 0 && s->codec_tag == AV_RL32("SLIF")) {
skip_bits1(&s->gb);
} else {
for (;;) {
while (get_bits_left(&s->gb) > 0) {
int code = get_vlc2(&s->gb, mbincr_vlc.table, MBINCR_VLC_BITS, 2);
if (code < 0) {
av_log(s->avctx, AV_LOG_ERROR, "first mb_incr damaged\n");


Loading…
Cancel
Save