[
https://issues.apache.org/jira/browse/COMPRESS-163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13163674#comment-13163674
]
John Kodis commented on COMPRESS-163:
-------------------------------------
Yes, the Pax headers are read in TarArchiveInputStream.paxHeaders. The pax
header keyword=value pairs are first read into a hash table, and the table is
subsequently scanned for values (namely, path, linkpath, uid, uname, gid,
gname, and size) which are contained in a TarArchiveEntry. If found, the
values in the Pax header hash table are used to supersede those in the current
TarArchiveEntry.
Also, on reviewing this section of code, I noticed that there's a minor error.
The fields in the Pax header are stored as a length, a space character, the
field name, an equals sign, the field value, and a newline character. So, for
example "30 atime=1321711775.972059463\n". The code which extracts the
keyword=value pairs ignores the length field and instead looks for the newline
character to mark the end of the value field. This is okay for numeric values,
but means that any path or linkpath values which contain a newline character
will be misinterpreted. So although the code isn't strictly correct, it's
unlikely to cause a problem in practice.
> Unable to extract a file larger than 8GB from a Posix-format tar archive
> ------------------------------------------------------------------------
>
> Key: COMPRESS-163
> URL: https://issues.apache.org/jira/browse/COMPRESS-163
> Project: Commons Compress
> Issue Type: Bug
> Components: Compressors
> Affects Versions: 1.3
> Environment: The tar archive used for testing was created by GNU tar,
> but the problem will occur with any Posix-formatted tar file containing files
> over 8GB in size.
> Reporter: John Kodis
> Priority: Minor
> Fix For: 1.4
>
> Attachments:
> 0003-Allow-reading-large-files-from-Posix-tar-archives.patch
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> An attempt to read a posix-format tar archive containing a file in excess of
> 8^11 bytes in size will fail with a "Size out of range" illegal argument
> exception.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira