[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tar(1) core-dumps on '-I file'
From: |
Peter Jeremy |
Subject: |
tar(1) core-dumps on '-I file' |
Date: |
Fri, 23 Mar 2001 09:30:36 +1100 (EST) |
>Submitter-Id: current-users
>Originator: Peter Jeremy
>Organization: Alcatel Australia Limited
>Confidential: no
>Synopsis: tar(1) core-dumps on '-I file'
>Severity: serious
>Priority: low
>Category: bin
>Class: sw-bug
>Release: FreeBSD 5.0-CURRENT i386
>Environment:
System: FreeBSD gsmx07.alcatel.com.au 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Thu
Jan 18 05:05:46 EST 2001 address@hidden:/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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- tar(1) core-dumps on '-I file',
Peter Jeremy <=