tag 130557 + upstream patch thanks On Sun, Oct 30, 2005 at 11:45:27AM +0100, Mike Hommey wrote:
> 1.2.3-6
Right, OK. There were some changes to the EOF handling in 1.2 so I
wanted to check. The following patch seems to fix the issue, at least
for the test case you provided - I'll forward it upstream.
--- zlib-1.2.3.orig/gzio.c 2005-10-30 10:56:39.000000000 +0000
+++ zlib-1.2.3/gzio.c 2005-10-30 10:55:36.000000000 +0000
@@ -301,6 +301,7 @@
if (len) s->inbuf[0] = s->stream.next_in[0];
errno = 0;
len = (uInt)fread(s->inbuf + len, 1, Z_BUFSIZE >> len, s->file);
+ if (len == 0) s->z_eof = 1;
if (len == 0 && ferror(s->file)) s->z_err = Z_ERRNO;
s->stream.avail_in += len;
s->stream.next_in = s->inbuf;
--
"You grabbed my hand and we fell into it, like a daydream - or a fever."
signature.asc
Description: Digital signature

