ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1486439 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/zip/Zip64ExtendedInformationExtraField.java
Date Sun, 26 May 2013 17:40:48 GMT
Author: bodewig
Date: Sun May 26 17:40:48 2013
New Revision: 1486439

URL: http://svn.apache.org/r1486439
Log:
merge zip64 fix from commons compress

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/main/org/apache/tools/zip/Zip64ExtendedInformationExtraField.java 
 (contents, props changed)

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=1486439&r1=1486438&r2=1486439&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Sun May 26 17:40:48 2013
@@ -8,6 +8,9 @@ Changes that could break older environme
 Fixed bugs:
 -----------
 
+ * Parsing of zip64 extra fields has become more lenient in order to
+   be able to read archives created by DotNetZip and maybe other
+   archivers as well.
 
 Other changes:
 --------------

Modified: ant/core/trunk/src/main/org/apache/tools/zip/Zip64ExtendedInformationExtraField.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/zip/Zip64ExtendedInformationExtraField.java?rev=1486439&r1=1486438&r2=1486439&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/zip/Zip64ExtendedInformationExtraField.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/zip/Zip64ExtendedInformationExtraField.java Sun
May 26 17:40:48 2013
@@ -240,7 +240,7 @@ public class Zip64ExtendedInformationExt
      * field with knowledge which fields are expected to be there.
      *
      * <p>All four fields inside the zip64 extended information extra
-     * field are optional and only present if their corresponding
+     * field are optional and must only be present if their corresponding
      * entry inside the central directory contains the correct magic
      * value.</p>
      */
@@ -254,7 +254,7 @@ public class Zip64ExtendedInformationExt
                 + (hasCompressedSize ? DWORD : 0)
                 + (hasRelativeHeaderOffset ? DWORD : 0)
                 + (hasDiskStart ? WORD : 0);
-            if (rawCentralDirectoryData.length != expectedLength) {
+            if (rawCentralDirectoryData.length < expectedLength) {
                 throw new ZipException("central directory zip64 extended"
                                        + " information extra field's length"
                                        + " doesn't match central directory"

Propchange: ant/core/trunk/src/main/org/apache/tools/zip/Zip64ExtendedInformationExtraField.java
------------------------------------------------------------------------------
  Merged /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/Zip64ExtendedInformationExtraField.java:r1486437



Mime
View raw message