Author: bodewig
Date: Tue Jul 26 14:12:44 2011
New Revision: 1151104

URL: http://svn.apache.org/viewvc?rev=1151104&view=rev
Log:
For non-ZIP64 entries this should actually fix COMPRESS-129

Modified:
    commons/proper/compress/trunk/src/changes/changes.xml
    
commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java

Modified: commons/proper/compress/trunk/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/changes/changes.xml?rev=1151104&r1=1151103&r2=1151104&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/changes/changes.xml (original)
+++ commons/proper/compress/trunk/src/changes/changes.xml Tue Jul 26 14:12:44 
2011
@@ -45,6 +45,10 @@ The <action> type attribute can be add,u
   </properties>
   <body>
     <release version="1.2" date="as in SVN" description="Release 1.2">
+      <action issue="COMPRESS-129" type="fix" date="2011-07-26">
+        ZipArchiveInputStream could fail with a "Truncated ZIP" error
+        message for entries between 2 GByte and 4 GByte in size.
+      </action>
       <action issue="COMPRESS-145" type="fix" date="2011-07-23"
               due-tue="Patrick Dreyer">
         TarArchiveInputStream now detects sparse entries using the

Modified: 
commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
URL: 
http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java?rev=1151104&r1=1151103&r2=1151104&view=diff
==============================================================================
--- 
commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
 (original)
+++ 
commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
 Tue Jul 26 14:12:44 2011
@@ -420,7 +420,7 @@ public class ZipArchiveInputStream exten
 
             long inB;
             if (current.getMethod() == ZipArchiveOutputStream.DEFLATED) {
-                inB = inf.getTotalIn();
+                inB = ZipUtil.adjustToLong(inf.getTotalIn());
             } else {
                 inB = readBytesOfEntry;
             }


Reply via email to