--- zlib-1.2.0.7/gzio.c.jbj 2003-09-13 20:41:26.000000000 -0400 +++ zlib-1.2.0.7/gzio.c 2003-10-08 11:28:18.592138869 -0400 @@ -889,7 +889,13 @@ { gz_stream *s = (gz_stream*)file; - return (s == NULL || s->mode != 'r') ? 0 : s->z_eof; + /* With concatenated compressed files that can have embedded + * crc trailers, z_eof is no longer the only/best indicator of EOF + * on a gz_stream. Handle end-of-stream error explicitly here. + */ + return ((s == NULL || s->mode != 'r') ? 0 : + (s->z_eof ? 1 : + (s->z_err == Z_STREAM_END ? 1 : 0) ) ); } /* =========================================================================== --- zlib-1.2.0.7/zlib.h.jbj 2003-10-08 11:24:49.501467744 -0400 +++ zlib-1.2.0.7/zlib.h 2003-10-08 11:29:04.745434541 -0400 @@ -28,8 +28,8 @@ (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). */ -#ifndef ZLIB_H -#define ZLIB_H +#ifndef _ZLIB_H +#define _ZLIB_H #include "zconf.h" @@ -1178,4 +1178,4 @@ } #endif -#endif /* ZLIB_H */ +#endif /* _ZLIB_H */