]> git.lizzy.rs Git - zlib.git/commitdiff
Fix bug in gzread.c when end-of-file is reached.
authorMark Adler <madler@alumni.caltech.edu>
Mon, 12 Dec 2011 07:30:56 +0000 (23:30 -0800)
committerMark Adler <madler@alumni.caltech.edu>
Mon, 12 Dec 2011 07:30:56 +0000 (23:30 -0800)
gzread.c

index cda793573e753ec990ba58d08790c0d93b448d20..1e97e38d70e7975bcec86d785fe40b42200c4937 100644 (file)
--- 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;
 }