Browse Source

avcodec/pngdec: check for stream end in png_decode_idat()

Fix infinite loop
Fix Ticket2978

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.1
Michael Niedermayer 12 years ago
parent
commit
65bf9a44d7
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/pngdec.c

+ 2
- 0
libavcodec/pngdec.c View File

@@ -381,6 +381,8 @@ static int png_decode_idat(PNGDecContext *s, int length)
s->zstream.avail_out = s->crow_size;
s->zstream.next_out = s->crow_buf;
}
if (ret == Z_STREAM_END)
break;
}
return 0;
}


Loading…
Cancel
Save