ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: GNU Tar terminated with null?
Date Thu, 21 Mar 2002 14:58:53 GMT
On Fri, 22 Mar 2002 01:58, Peter Donald wrote:
> Hi,
>
> I just came across what I think is a bug in the tar utility classes. In
> method putNextEntry at about line 170

of TarOutputStream

> there is the following
>
> // create a TarEntry for the LongLink, the contents
> // of which are the entry's name
> TarEntry longLinkEntry = new TarEntry(TarConstants.GNU_LONGLINK,
>                                   TarConstants.LF_GNUTYPE_LONGNAME);
>
> longLinkEntry.setSize(entry.getName().length() + 1);
> putNextEntry(longLinkEntry);
>
> write(entry.getName().getBytes());
> write(0);
> closeEntry();
>
> Notice that it terminates the string with a NULL/0 - is this an error. It
> looks like it is an error???? Shouldn't we nuke the +1 and write(0) ?

-- 
Cheers,

Pete

------------------------------
Kitsch never goes out of style
------------------------------

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message