From jeremyp@gsmx07.alcatel.com.au  Thu Mar 22 14:31:25 2001
Return-Path: <jeremyp@gsmx07.alcatel.com.au>
Received: from netau1.alcanet.com.au (ntp.alcanet.com.au [203.62.196.27])
	by hub.freebsd.org (Postfix) with ESMTP id 71D3037B724
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 22 Mar 2001 14:31:23 -0800 (PST)
	(envelope-from jeremyp@gsmx07.alcatel.com.au)
Received: from mfg1.cim.alcatel.com.au (mfg1.cim.alcatel.com.au [139.188.23.1])
	by netau1.alcanet.com.au (8.9.3 (PHNE_22672)/8.9.3) with ESMTP id JAA29880;
	Fri, 23 Mar 2001 09:31:19 +1100 (EDT)
Received: from gsmx07.alcatel.com.au by cim.alcatel.com.au
 (PMDF V5.2-32 #37641) with ESMTP id <01K1J52MUS5CRX4C1X@cim.alcatel.com.au>;
 Fri, 23 Mar 2001 09:30:24 +1100
Received: (from jeremyp@localhost)	by gsmx07.alcatel.com.au (8.11.1/8.11.1)
 id f2MMUaT09764; Fri, 23 Mar 2001 09:30:36 +1100 (EST envelope-from jeremyp)
Message-Id: <200103222230.f2MMUaT09764@gsmx07.alcatel.com.au>
Date: Fri, 23 Mar 2001 09:30:36 +1100 (EST)
From: Peter Jeremy <jeremyp@gsmx07.alcatel.com.au>
Reply-To: peter.jeremy@alcatel.com.au
To: FreeBSD-gnats-submit@freebsd.org
Cc: bug-gnu-utils@prep.ai.mit.edu
Subject: tar(1) core-dumps on '-I file'
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         26010
>Category:       bin
>Synopsis:       tar(1) core-dumps on '-I file'
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 22 14:40:00 PST 2001
>Closed-Date:    Fri Nov 16 14:19:45 PST 2001
>Last-Modified:  Fri Nov 16 14:20:27 PST 2001
>Originator:     Peter Jeremy
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
Alcatel Australia Limited
>Environment:
System: FreeBSD gsmx07.alcatel.com.au 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Thu Jan 18 05:05:46 EST 2001 root@gsmx07.alcatel.com.au:/usr/obj/3.0/cvs/src/sys/gsmx i386

	GNU tar 1.11.2

>Description:
	The '-I' option of tar is used to specify a file containing a list
	of files to create/extract.  Whilst the option parsing code expects
	'-I' to take an option, the string passed to getoldopts() specifies
	that '-I' doesn't take an option.  This leads to NULL being passed
	to strcmp().

>How-To-Repeat:
	echo "/bin" >/tmp/foo
	tar -cf /dev/null -I /tmp/foo

>Fix:

Index: tar.c
===================================================================
RCS file: /home/CVSROOT/src/gnu/usr.bin/tar/tar.c,v
retrieving revision 1.23
diff -u -r1.23 tar.c
--- tar.c	2000/12/24 10:52:23	1.23
+++ tar.c	2001/03/22 22:21:32
@@ -324,7 +324,7 @@
 
   /* Parse options */
   while ((c = getoldopt (argc, argv,
-	       "-01234567Ab:BcC:df:F:g:GhiIjkK:lL:mMnN:oOpPrRsStT:uUvV:wWxX:yzZ",
+	       "-01234567Ab:BcC:df:F:g:GhiI:jkK:lL:mMnN:oOpPrRsStT:uUvV:wWxX:yzZ",
 			 long_options, &ind)) != EOF)
     {
       switch (c)

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: ache 
State-Changed-When: Fri Mar 23 04:40:00 PST 2001 
State-Changed-Why:  
Fix commited into -current 

http://www.freebsd.org/cgi/query-pr.cgi?pr=26010 
Responsible-Changed-From-To: freebsd-bugs->ache 
Responsible-Changed-By: alex 
Responsible-Changed-When: Tue May 29 05:39:24 PDT 2001 
Responsible-Changed-Why:  
Fix committed by ache, he might want to MFC it 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=26010 
Responsible-Changed-From-To: ache->bugs 
Responsible-Changed-By: ache 
Responsible-Changed-When: Fri Nov 16 13:49:46 PST 2001 
Responsible-Changed-Why:  
I am not able to test things on -stable 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=26010 
State-Changed-From-To: analyzed->closed 
State-Changed-By: bmah 
State-Changed-When: Fri Nov 16 14:19:45 PST 2001 
State-Changed-Why:  
MFC already done by kris...see rev 1.19.2.4. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=26010 
>Unformatted:
