summaryrefslogtreecommitdiffstats
path: root/usr.bin/gzip/gzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/gzip/gzip.c')
-rw-r--r--usr.bin/gzip/gzip.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/gzip/gzip.c b/usr.bin/gzip/gzip.c
index 4e16bf7..3f9bb4a 100644
--- a/usr.bin/gzip/gzip.c
+++ b/usr.bin/gzip/gzip.c
@@ -916,6 +916,8 @@ gz_uncompress(int in, int out, char *pre, size_t prelen, off_t *gsizep,
switch (error) {
/* Z_BUF_ERROR goes with Z_FINISH... */
case Z_BUF_ERROR:
+ if (z.avail_out > 0 && !done_reading)
+ continue;
case Z_STREAM_END:
case Z_OK:
break;
OpenPOWER on IntegriCloud