From owner-freebsd-current@FreeBSD.ORG Fri Nov 13 22:49:53 2009 Return-Path: Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2167B1065692; Fri, 13 Nov 2009 22:49:53 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id F32B58FC14; Fri, 13 Nov 2009 22:49:51 +0000 (UTC) Received: from localhost (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 2D95955CD931; Sat, 14 Nov 2009 06:49:50 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by localhost (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with ESMTP id BH3dYCsz3d1F; Sat, 14 Nov 2009 06:49:43 +0800 (CST) Received: from delta.delphij.net (drawbridge.ixsystems.net [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 622C055CD908; Sat, 14 Nov 2009 06:49:39 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type; b=MU2mo38hKF0JkdPZqK6M9RJhTmYPyOFYpgcEh+v4FKAkryHeJxOv5+0gfdKXeDiP5 nW7SzNrj+2fJWR8yFp2LQ== Message-ID: <4AFDE27F.1070406@delphij.net> Date: Fri, 13 Nov 2009 14:49:35 -0800 From: Xin LI Organization: The Geek China Organization User-Agent: Thunderbird 2.0.0.23 (X11/20091022) MIME-Version: 1.0 To: d@delphij.net References: <200911090237.nA92b2m7005471__19254.880565177$1257734275$gmane$org@svn.freebsd.org> <867htvhygy.fsf@gmail.com> <4AFDDEA1.70900@delphij.net> In-Reply-To: <4AFDDEA1.70900@delphij.net> X-Enigmail-Version: 0.95.7 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: multipart/mixed; boundary="------------070309000702060209030507" Cc: Anonymous , freebsd-current@FreeBSD.ORG, Xin LI , matthew green Subject: Re: svn commit: r199066 - head/usr.bin/gzip X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Nov 2009 22:49:53 -0000 This is a multi-part message in MIME format. --------------070309000702060209030507 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Xin LI wrote: > Anonymous wrote: >> Xin LI writes: > >>> Author: delphij >>> Date: Mon Nov 9 02:37:02 2009 >>> New Revision: 199066 >>> URL: http://svn.freebsd.org/changeset/base/199066 >>> >>> Log: >>> Apply a NetBSD fix (revision 1.12) to handle multi-session bzip2 files >>> as created by pbzip2. >>> >>> Submitted by: mrg (NetBSD.org) >>> MFC after: 1 week >>> >>> Modified: >>> head/usr.bin/gzip/unbzip2.c >>> >> $ touch blah >> $ bzip2 blah >> $ gzip -d blah.bz2 >> gzip: read: No such file or directory >> Exit 2 > >> Regression? Can you reproduce? > > Yes, this is a regression (confirmed that this behavior is different > from bzip2 and a regression from 199065). Thanks for your report and > I'll investigate what's happening. I think the attached patch should fixed this issue. Could you please test? Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) iEYEARECAAYFAkr94n8ACgkQi+vbBBjt66D4VQCfekBnaZdllB2EPffhlpfW0S7v q5sAoJWPfTXhILLajqX80NbDHXRj0iNy =NaaM -----END PGP SIGNATURE----- --------------070309000702060209030507 Content-Type: text/plain; name="gzip.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gzip.diff" Index: usr.bin/gzip/unbzip2.c =================================================================== --- usr.bin/gzip/unbzip2.c (revision 199258) +++ usr.bin/gzip/unbzip2.c (working copy) @@ -71,7 +71,7 @@ n = read(in, inbuf, BUFLEN); if (n < 0) maybe_err("read"); - if (n == 0) + if (n < BUFLEN) end_of_file = 1; bzs.next_in = inbuf; bzs.avail_in = n; --------------070309000702060209030507--