Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 56026 invoked from network); 9 Sep 2006 21:48:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Sep 2006 21:48:20 -0000 Received: (qmail 13034 invoked by uid 500); 9 Sep 2006 21:48:19 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 12989 invoked by uid 500); 9 Sep 2006 21:48:19 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 12978 invoked by uid 500); 9 Sep 2006 21:48:19 -0000 Received: (qmail 12975 invoked by uid 99); 9 Sep 2006 21:48:19 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Sep 2006 14:48:19 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Sep 2006 14:48:19 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id DD8691A981A; Sat, 9 Sep 2006 14:47:58 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r441862 - in /ant/core/trunk: CONTRIBUTORS WHATSNEW contributors.xml src/main/org/apache/tools/tar/TarBuffer.java Date: Sat, 09 Sep 2006 21:47:58 -0000 To: ant-cvs@apache.org From: peterreilly@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20060909214758.DD8691A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: peterreilly Date: Sat Sep 9 14:47:57 2006 New Revision: 441862 URL: http://svn.apache.org/viewvc?view=rev&rev=441862 Log: TarInputStream.read() never returns EOF: bugzilla 39924 Modified: ant/core/trunk/CONTRIBUTORS ant/core/trunk/WHATSNEW ant/core/trunk/contributors.xml ant/core/trunk/src/main/org/apache/tools/tar/TarBuffer.java Modified: ant/core/trunk/CONTRIBUTORS URL: http://svn.apache.org/viewvc/ant/core/trunk/CONTRIBUTORS?view=diff&rev=441862&r1=441861&r2=441862 ============================================================================== Binary files - no diff available. Modified: ant/core/trunk/WHATSNEW URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diff&rev=441862&r1=441861&r2=441862 ============================================================================== --- ant/core/trunk/WHATSNEW (original) +++ ant/core/trunk/WHATSNEW Sat Sep 9 14:47:57 2006 @@ -16,6 +16,8 @@ * AntClassLoader did not isolate resources when isolate was set. Bugzilla report 38747. * Diagnostics broken when using java 1.4. Bugzilla report 40395. * Exception reporting in was broken. Bugzilla report 40300. +* Handling of corrupt tar files, TarInputStream.read() never returns EOF. + Bugzilla report 39924. Other changes: -------------- Modified: ant/core/trunk/contributors.xml URL: http://svn.apache.org/viewvc/ant/core/trunk/contributors.xml?view=diff&rev=441862&r1=441861&r2=441862 ============================================================================== --- ant/core/trunk/contributors.xml (original) +++ ant/core/trunk/contributors.xml Sat Sep 9 14:47:57 2006 @@ -749,6 +749,10 @@ Peter + Hulst + + + Peter Reilly Modified: ant/core/trunk/src/main/org/apache/tools/tar/TarBuffer.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/tar/TarBuffer.java?view=diff&rev=441862&r1=441861&r2=441862 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/tar/TarBuffer.java (original) +++ ant/core/trunk/src/main/org/apache/tools/tar/TarBuffer.java Sat Sep 9 14:47:57 2006 @@ -271,6 +271,12 @@ // Thanks to 'Yohann.Roussel@alcatel.fr' for this fix. // if (numBytes == -1) { + if (offset == 0) { + // Ensure that we do not read gigabytes of zeros + // for a corrupt tar file. + // See http://issues.apache.org/bugzilla/show_bug.cgi?id=39924 + return false; + } // However, just leaving the unread portion of the buffer dirty does // cause problems in some cases. This problem is described in // http://issues.apache.org/bugzilla/show_bug.cgi?id=29877 --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org