Subject: tar 1.11.8, cygwin32 B17.1: Problem with remote tapes and ':' in filenames.
From: [email-masked] ("Griswold, Victor")

11 Feb 1997 22:45:15 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <199702111631.LAA03629.cygnus.gnu-win32@telxon>
Mime-Version: 1.0
Content-Type: text/plain
Original-To: "'GNU:Tar-Bugs'" <[email-masked]>,
        "Cygnus: GNU-WIN32"
	 <[email-masked]>
X-Priority: 3
X-Mailer: Internet Mail Service (5.0.1389.3)
Original-Sender: [email-masked]

An inappropriate parsing of a WIN32 filespec containing a ':' results in
uncovering a bug in '__rmt_open' of 'src/rtapelib.c'.  In line 311,
'remote_user' is dereferenced without first checking to see if it was
specified by the invocation of 'tar'.  In such a case, 'remote_user' is
still set to NULL (line 282), and an exception occurs when trying to
read location 0.

With respect to cygwin32, the '_remdev' macro in 'rmt.h' presumes that,
if a filespec contains a colon not preceeded by a slash, it is a remote
filename.  This is an inadequate check for the WIN32 environment, where
"__rmt_path == (Path + 1) && isalpha((Path[0])) && (__rmt_path[1] == '/'
|| __rmt_path[1] == '\\') " should also be checked.

The only apparent workaround, without something like the above patch, is
to specify '--force-local' on all 'tar' command lines which might
potentially contain a drive letter (unpleasant, and should be
unnecessary, though an appropriate shell alias would help).

Victor J. Griswold, D.Sc.
Aironet Wireless Communications, Inc.
voice:	330-664-7987
fax:	330-664-7301
email:	(MS-Mail) [email-masked]
	(MIME) [email-masked]

-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".