[Zlib-devel] zlib 1.2.3.4 Winter Solstice Edition
Mark Brown
broonie at sirena.org.uk
Fri Dec 25 14:02:13 EST 2009
On Fri, Dec 25, 2009 at 03:53:32PM +0000, Mark Brown wrote:
> I also needed to apply the following reversion patch to avoid triggering
> an infinite loop in man-db while rebuilding its caches. Looking at the
> code I suspect that this may actually be a latent issue in man-db that's
> been exposed but I've not had time to dig through that properly.
I've now analysed this a bit more. The problem is that z_eof can get
set as soon as feof() is true, which will happen as soon as the input is
exhausted. However, since gzio is still buffering data (even for
transparent streams) it is possible that there may still be data
buffered in gzio even when there is no more data which can be read from
the input file. If z_eof is set and checked for then gzread will return
0 even if there is data buffered - the check for z_eof should be updated
to check to see if there is any data buffered if it remains.
More information about the Zlib-devel
mailing list