You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by bo...@apache.org on 2019/08/18 10:12:50 UTC

[commons-compress] branch master updated (82986dd -> a9aabdd)

This is an automated email from the ASF dual-hosted git repository.

bodewig pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git.


    from 82986dd  COMPRESS-482 stored with data descriptor now works without DD signature
     new d3ed06a  COMPRESS-482 ensure there is enough data available for a DD
     new a9aabdd  COMPRESS-482 document change

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/changes/changes.xml                                              | 5 +++++
 .../apache/commons/compress/archivers/zip/ZipArchiveInputStream.java | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)


[commons-compress] 01/02: COMPRESS-482 ensure there is enough data available for a DD

Posted by bo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bodewig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git

commit d3ed06a07b880fca2ef2610ba1f3d33f7f566caa
Author: Stefan Bodewig <bo...@apache.org>
AuthorDate: Sun Aug 18 12:02:58 2019 +0200

    COMPRESS-482 ensure there is enough data available for a DD
---
 .../apache/commons/compress/archivers/zip/ZipArchiveInputStream.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
index 818c1bf..229e915 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
@@ -932,7 +932,8 @@ public class ZipArchiveInputStream extends ArchiveInputStream implements InputSt
         for (int i = 0; !done && i < offset + lastRead - 4; i++) {
             if (buf.array()[i] == LFH[0] && buf.array()[i + 1] == LFH[1]) {
                 int expectDDPos = i;
-                if ((buf.array()[i + 2] == LFH[2] && buf.array()[i + 3] == LFH[3])
+                if (i >= expectedDDLen &&
+                    (buf.array()[i + 2] == LFH[2] && buf.array()[i + 3] == LFH[3])
                     || (buf.array()[i] == CFH[2] && buf.array()[i + 3] == CFH[3])) {
                     // found a LFH or CFH:
                     expectDDPos = i - expectedDDLen;


[commons-compress] 02/02: COMPRESS-482 document change

Posted by bo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bodewig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git

commit a9aabdd9ef5e822710734aafde1a90e4b619ce78
Author: Stefan Bodewig <bo...@apache.org>
AuthorDate: Sun Aug 18 12:05:30 2019 +0200

    COMPRESS-482 document change
---
 src/changes/changes.xml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index c9f2e8c..d18539b 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -127,6 +127,11 @@ when they are read via ZipArchiveInputStream or ZipFile.
         parsing process with a new overload of
         ZipArchiveEntry#getExtraFields.
       </action>
+      <action type="update" date="2019-08-18" issue="COMPRESS-482">
+        ZipArchiveInputStream failed to read stored entries with a
+        data descriptor if the data descriptor didn't use the
+        signature invented by InfoZIP.
+      </action>
     </release>
     <release version="1.18" date="2018-08-16"
              description="Release 1.18">