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

Fix infinite loop
Fix Ticket2978

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/36/head
Michael Niedermayer 12 years ago
parent bb4b041df3
commit 65bf9a44d7
  1. 2
      libavcodec/pngdec.c

@ -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