ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
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 GMT
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 <copy> 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 @@
   </name>
   <name>
     <first>Peter</first>
+    <last>Hulst</last>
+  </name>
+  <name>
+    <first>Peter</first>
     <last>Reilly</last>
   </name>
   <name>

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


Mime
View raw message