From nicolas@narr.dyn.dhs.org  Mon Feb 11 02:18:00 2002
Return-Path: <nicolas@narr.dyn.dhs.org>
Received: from mailout03.sul.t-online.com (mailout03.sul.t-online.com [194.25.134.81])
	by hub.freebsd.org (Postfix) with ESMTP id 6A0F737B400
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 11 Feb 2002 02:17:59 -0800 (PST)
Received: from fwd03.sul.t-online.de 
	by mailout03.sul.t-online.com with smtp 
	id 16aDX4-0002uE-01; Mon, 11 Feb 2002 11:17:58 +0100
Received: from pc5.abc (520067998749-0001@[217.233.119.135]) by fmrl03.sul.t-online.com
	with esmtp id 16aDWu-1po2xkC; Mon, 11 Feb 2002 11:17:48 +0100
Received: (from nicolas@localhost)
	by pc5.abc (8.11.6/8.11.6) id g1BAHhm07609;
	Mon, 11 Feb 2002 11:17:43 +0100 (CET)
	(envelope-from nicolas)
Message-Id: <200202111017.g1BAHhm07609@pc5.abc>
Date: Mon, 11 Feb 2002 11:17:43 +0100 (CET)
From: Nicolas Rachinsky <list@rachinsky.de>
Reply-To: Nicolas Rachinsky <list@rachinsky.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: bzip2 cannot handle filenames containing * or ?
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         34819
>Category:       bin
>Synopsis:       bzip2 cannot handle filenames containing * or ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 11 02:20:02 PST 2002
>Closed-Date:    Mon Feb 18 04:15:03 PST 2002
>Last-Modified:  Mon Feb 18 04:15:50 PST 2002
>Originator:     Nicolas Rachinsky
>Release:        FreeBSD 4.5-RELEASE i386
>Organization:
>Environment:
System: FreeBSD pc5.abc 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Sat Feb 9 15:45:34 CET 2002 nicolas@pc5.abc:/usr/obj/usr/src/sys/NR i386


	
>Description:

bzip2 seems to try its own expansion of wildcards like * or ?. So you 
cannot compress files which names contain * or ?.

This is my first PR, so please excuse if it's not in a good shape or 
bits are missing (I hope it's ok, but I don't know).

>How-To-Repeat:

#date > aa\*aa
#bzip2 aa\*aa

#date > aa\?aa
#bzip2 aa\?aa

>Fix:

	


>Release-Note:
>Audit-Trail:

From: Mike Makonnen <mike_makonnen@yahoo.com>
To: Nicolas Rachinsky <list@rachinsky.de>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/34819: bzip2 cannot handle filenames containing * or ?
Date: Mon, 11 Feb 2002 04:26:15 -0800

 It appears from the source code that it specifically checks for the
 occurrence of '*' and '?' in the file name and fails if either one does
 occur:
 
 	static 
 	Bool containsDubiousChars ( Char* name )
 	{
    		Bool cdc = False;
    		for (; *name != '\0'; name++)   
       		if (*name == '?' || *name == '*') cdc = True;
    		return cdc;
 	}
 
 and ...
 
    if ( srcMode != SM_I2O && containsDubiousChars ( inName ) ) {
       if (noisy)
       fprintf ( stderr, "%s: There are no files matching `%s'.\n",
                 progName, inName );
       setExit(1);
       return;
    }
 
 The error string should probably be more helpful.
 
 Having said that, bzip2 is contributed software so you should complain
 to its creator: Julian Seward http://sources.redhat.com/bzip2/
 
 cheers,
 mike makonnen

From: Nicolas Rachinsky <list@rachinsky.de>
To: Mike Makonnen <mike_makonnen@yahoo.com>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/34819: bzip2 cannot handle filenames containing * or ?
Date: Thu, 14 Feb 2002 20:13:44 +0100

 --mP3DRpeJDSE+ciuQ
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 * On Mon, Feb 11, 2002 at 04:26:15AM -0800,
 * Mike Makonnen <mike_makonnen@yahoo.com> wrote:
 > Having said that, bzip2 is contributed software so you should complain
 > to its creator: Julian Seward http://sources.redhat.com/bzip2/
 
 I asked Julian, see the attached mail.
 
 Nicolas
 
 --mP3DRpeJDSE+ciuQ
 Content-Type: message/rfc822
 Content-Disposition: inline
 
 Received: from localhost (localhost.abc [127.0.0.1])
 	by pc5.abc (8.11.6/8.11.6) with ESMTP id g1EJ4P149266
 	for <nicolas@localhost>; Thu, 14 Feb 2002 20:04:25 +0100 (CET)
 	(envelope-from Julian_Seward@muraroa.demon.co.uk)
 Envelope-to: list@rachinsky.de
 Delivery-date: Thu, 14 Feb 2002 20:04:14 +0100
 Received: from pop.kundenserver.de [212.227.126.142]
 	by localhost with POP3 (fetchmail-5.9.6 polling lists account pt6334525-123)
 	for nicolas@localhost (single-drop); Thu, 14 Feb 2002 20:04:25 +0100 (CET)
 Received: from [194.217.242.20] (helo=tele-post-20.mail.demon.net)
 	by mxng04.kundenserver.de with esmtp (Exim 3.22 #2)
 	id 16bRAg-0005Gb-00
 	for list@rachinsky.de; Thu, 14 Feb 2002 20:03:54 +0100
 Received: from muraroa.demon.co.uk ([194.222.137.74])
 	by tele-post-20.mail.demon.net with esmtp (Exim 3.34 #1)
 	id 16bRAe-000EzQ-0K
 	for list@rachinsky.de; Thu, 14 Feb 2002 19:03:53 +0000
 Sender: sewardj@pop.kundenserver.de
 Message-ID: <3C6C07C9.3E92CB41@muraroa.demon.co.uk>
 Date: Thu, 14 Feb 2002 18:54:01 +0000
 From: Julian Seward <Julian_Seward@muraroa.demon.co.uk>
 X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.4.9-13 i586)
 X-Accept-Language: en
 MIME-Version: 1.0
 To: Nicolas Rachinsky <list@rachinsky.de>
 Subject: Re: bzip2 cannot handle filenames containing * or ?
 References: <20020214104356.GA20084@pc5.abc>
 Content-Type: text/plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 Nicolas Rachinsky wrote:
 > 
 > Hallo,
 > 
 > first I want to say bzip2 is really a good program.
 > 
 > But I have one problem with it, it cannot handle files which names
 > contain * or ?. The source code shows this behaviour is intended, but
 > I think that's not good, because unix software should be able to
 > handle all possible filenames. Or is there any thing I overlooked?
 > 
 > Thanks
 > Nicolas
 Upgrade to 1.0.2; this problem is fixed there.
 http://sources.redhat.com/bzip2
 
 J
 
 
 
 --mP3DRpeJDSE+ciuQ--
State-Changed-From-To: open->closed 
State-Changed-By: sobomax 
State-Changed-When: Mon Feb 18 04:15:03 PST 2002 
State-Changed-Why:  
Originator reports that the problem is solved in recent -STABLE (after bzip2 
update to 1.0.2). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=34819 
>Unformatted:
