aboutsummaryrefslogtreecommitdiff
path: root/gzlib.c
diff options
context:
space:
mode:
authorMark Adler <git@madler.net>2025-05-25 21:46:47 -0700
committerMark Adler <git@madler.net>2025-12-06 19:56:13 -0800
commit370ef1b41fd35fbfcf2af317ef3d8065a132f27a (patch)
tree3a7707b876f2934b04d1ecfff33708d6350a7ad4 /gzlib.c
parent562b823635fdcd26e44961f6bd213ae0c10be098 (diff)
downloadzlib-370ef1b41fd35fbfcf2af317ef3d8065a132f27a.tar.gz
zlib-370ef1b41fd35fbfcf2af317ef3d8065a132f27a.tar.bz2
zlib-370ef1b41fd35fbfcf2af317ef3d8065a132f27a.zip
Return all available uncompressed data on error in gzread.c.
The error is recorded, and will be detected by the application after all of the uncompressed data has been consumed and then one more call is made to read data. The error is available immediately from gzerror() if the application would like to know earlier.
Diffstat (limited to 'gzlib.c')
-rw-r--r--gzlib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gzlib.c b/gzlib.c
index 79a7e978..1c5c7be6 100644
--- a/gzlib.c
+++ b/gzlib.c
@@ -104,6 +104,7 @@ local gzFile gz_open(const void *path, int fd, const char *mode) {
104 return NULL; 104 return NULL;
105 state->size = 0; /* no buffers allocated yet */ 105 state->size = 0; /* no buffers allocated yet */
106 state->want = GZBUFSIZE; /* requested buffer size */ 106 state->want = GZBUFSIZE; /* requested buffer size */
107 state->err = Z_OK; /* no error yet */
107 state->msg = NULL; /* no error message yet */ 108 state->msg = NULL; /* no error message yet */
108 109
109 /* interpret mode */ 110 /* interpret mode */