[From nobody Thu Sep 12 14:37:21 2019
Return-path: &lt;debbugs@rietz.debian.org&gt;
Envelope-to: broonie@sirena.org.uk
Delivery-date: Mon, 11 Feb 2008 16:11:05 +0000
Received: from rietz.debian.org ([140.211.166.43])
 by cassiel.sirena.org.uk with esmtp (Exim 4.63)
 (envelope-from &lt;debbugs@rietz.debian.org&gt;) id 1JObFG-0005ha-51
 for broonie@sirena.org.uk; Mon, 11 Feb 2008 16:11:05 +0000
Received: from debbugs by rietz.debian.org with local (Exim 4.63)
 (envelope-from &lt;debbugs@rietz.debian.org&gt;)
 id 1JObAb-0003r6-58; Mon, 11 Feb 2008 16:06:13 +0000
X-Loop: owner@bugs.debian.org
Reply-To: Martin Mares &lt;mj@ucw.cz&gt;, 465277@bugs.debian.org
Resent-From: Martin Mares &lt;mj@ucw.cz&gt;
Resent-To: debian-bugs-dist@lists.debian.org
Resent-CC: Mark Brown &lt;broonie@debian.org&gt;
Resent-Date: Mon, 11 Feb 2008 16:06:10 +0000
Resent-Message-ID: &lt;handler.465277.B.120274593913303@bugs.debian.org&gt;
X-Debian-PR-Message: report 465277
X-Debian-PR-Package: zlib1g
X-Debian-PR-Keywords: patch
X-Debian-PR-Source: zlib
Received: via spool by submit@bugs.debian.org id=B.120274593913303
 (code B ref -1); Mon, 11 Feb 2008 16:06:10 +0000
Received: (at submit) by bugs.debian.org; 11 Feb 2008 16:05:39 +0000
Received: from jabberwock.ucw.cz ([89.250.246.4] ident=postfix)
 by rietz.debian.org with esmtp (Exim 4.63)
 (envelope-from &lt;mj@ucw.cz&gt;) id 1JObA3-0003Rh-2V
 for submit@bugs.debian.org; Mon, 11 Feb 2008 16:05:39 +0000
Received: from ursula.ucw.cz (styx.suse.cz [82.119.242.94])
 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
 (Client CN &quot;ursula.burrow.ucw.cz&quot;, Issuer &quot;ucw.cz&quot; (verified OK))
 by jabberwock.ucw.cz (Postfix) with ESMTP id 00513CF4FF;
 Mon, 11 Feb 2008 17:05:37 +0100 (CET)
Received: by ursula.ucw.cz (Postfix, from userid 1000)
 id 7576048E51; Mon, 11 Feb 2008 17:05:36 +0100 (CET)
Content-Type: text/plain; charset=&quot;us-ascii&quot;
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Martin Mares &lt;mj@ucw.cz&gt;
To: Debian Bug Tracking System &lt;submit@bugs.debian.org&gt;
Message-ID: &lt;20080211160536.7278.73970.reportbug@ursula.ucw.cz&gt;
X-Mailer: reportbug 3.31
Date: Mon, 11 Feb 2008 17:05:36 +0100
Delivered-To: submit@bugs.debian.org
Resent-Sender: Debian BTS &lt;debbugs@rietz.debian.org&gt;
Resent-Date: Mon, 11 Feb 2008 16:06:13 +0000
X-SA-Exim-Connect-IP: 140.211.166.43
X-SA-Exim-Mail-From: debbugs@rietz.debian.org
X-Spam-Checker-Version: SpamAssassin 3.1.7-deb (2006-10-05) on 
 cassiel.sirena.org.uk
X-Spam-Level: 
X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO,
 UNPARSEABLE_RELAY autolearn=ham version=3.1.7-deb
Subject: Bug#465277: zlib1g: gzopen() fails on empty files
X-SA-Exim-Version: 4.2.1 (built Tue, 09 Jan 2007 17:23:22 +0000)
X-SA-Exim-Scanned: Yes (on cassiel.sirena.org.uk)
X-CRM114-Version: 20060704a-BlameRobert ( TRE 0.7.3 (LGPL) ) MR-A525BF66 
X-CRM114-CacheID: sfid-20080211_161105_427962_EE880DA7 
X-CRM114-Status: GOOD (  34.65  )

Package: zlib1g
Version: 1:1.2.3-13
Severity: normal
Tags: patch

When gzopen() is called on an empty file, gzgets() reports end of file
properly, but gzerror() returns the Z_BUF_ERROR. I think that the Debian
patch fixing problems with empty files solves the problem only partially
and that it is necessary to set the transparent mode to 1 in this case.

Patch follows:

--- zlib-1.2.3/gzio.c.mj	2008-02-11 16:53:33.000000000 +0100
+++ zlib-1.2.3/gzio.c	2008-02-11 16:54:15.000000000 +0100
@@ -306,7 +306,7 @@
         s-&gt;stream.avail_in += len;
         s-&gt;stream.next_in = s-&gt;inbuf;
         if (s-&gt;stream.avail_in &lt; 2) {
-            s-&gt;transparent = s-&gt;stream.avail_in;
+            s-&gt;transparent = 1;
             return;
         }
     }


-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.23.9
Locale: LANG=C, LC_CTYPE=cs_CZ (charmap=ISO-8859-2)

Versions of packages zlib1g depends on:
ii  libc6                  2.3.6.ds1-13etch2 GNU C Library: Shared libraries

zlib1g recommends no packages.

-- no debconf information



]