]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix bug in gzwrite.c that produced corrupt gzip files.
authorMark Adler <madler@alumni.caltech.edu>
Tue, 3 Jan 2017 00:17:43 +0000 (16:17 -0800)
committerHans Kristian Rosbach <hk-git@circlestorm.org>
Thu, 9 Feb 2017 10:55:44 +0000 (11:55 +0100)
gzwrite.c

index c1dd3ca4cc106fd66a25ef15d4fdf8c2daaa3d58..6746b66791a29768d9fb7c0e183b3f1fe3271752 100644 (file)
--- a/gzwrite.c
+++ b/gzwrite.c
@@ -103,6 +103,7 @@ static int gz_comp(gz_statep state, int flush) {
             if (strm->avail_out == 0) {
                 strm->avail_out = state->size;
                 strm->next_out = state->out;
+                state->x.next = state->out;
             }
             state->x.next = strm->next_out;
         }