Commit 65bf9a44 authored by Michael Niedermayer's avatar Michael Niedermayer

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

Fix infinite loop
Fix Ticket2978
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent bb4b041d
...@@ -381,6 +381,8 @@ static int png_decode_idat(PNGDecContext *s, int length) ...@@ -381,6 +381,8 @@ static int png_decode_idat(PNGDecContext *s, int length)
s->zstream.avail_out = s->crow_size; s->zstream.avail_out = s->crow_size;
s->zstream.next_out = s->crow_buf; s->zstream.next_out = s->crow_buf;
} }
if (ret == Z_STREAM_END)
break;
} }
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment