From: Mark Adler Date: Mon, 12 Dec 2011 07:30:56 +0000 (-0800) Subject: Fix bug in gzread.c when end-of-file is reached. X-Git-Tag: v1.2.5.2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=377173b57ef9fab5066481a87a1901bd72fa2c32;p=thirdparty%2Fzlib-ng.git Fix bug in gzread.c when end-of-file is reached. --- diff --git a/gzread.c b/gzread.c index cda793573..1e97e38d7 100644 --- a/gzread.c +++ b/gzread.c @@ -242,7 +242,7 @@ local int gz_fetch(state) if (gz_decomp(state) == -1) return -1; } - } while (state->x.have == 0); + } while (state->x.have == 0 && (!state->eof || strm->avail_in)); return 0; }