Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D05E49221 for ; Tue, 6 Dec 2011 16:20:03 +0000 (UTC) Received: (qmail 24778 invoked by uid 500); 6 Dec 2011 16:20:03 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 24710 invoked by uid 500); 6 Dec 2011 16:20:03 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 24648 invoked by uid 99); 6 Dec 2011 16:20:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Dec 2011 16:20:03 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Dec 2011 16:20:00 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id E463B103225 for ; Tue, 6 Dec 2011 16:19:39 +0000 (UTC) Date: Tue, 6 Dec 2011 16:19:39 +0000 (UTC) From: "John Kodis (Commented) (JIRA)" To: issues@commons.apache.org Message-ID: <1136140906.46001.1323188379936.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <445428454.37632.1322931399942.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (COMPRESS-163) Unable to extract a file larger than 8GB from a Posix-format tar archive MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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