From 79baebe50e4d6b73ae1f8b603f0ef41300110aa3 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Sat, 13 Apr 2019 17:05:16 -0700 Subject: Avoid adding empty gzip member after gzflush with Z_FINISH. --- gzlib.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gzlib.c') diff --git a/gzlib.c b/gzlib.c index 4838bf0..f6b3b40 100644 --- a/gzlib.c +++ b/gzlib.c @@ -81,6 +81,8 @@ local void gz_reset(state) state->past = 0; /* have not read past end yet */ state->how = LOOK; /* look for gzip header */ } + else /* for writing ... */ + state->reset = 0; /* no deflateReset pending */ state->seek = 0; /* no seek request pending */ gz_error(state, Z_OK, NULL); /* clear error */ state->x.pos = 0; /* no uncompressed data yet */ -- cgit v1.2.3-55-g6feb