This is an automated email from the ASF dual-hosted git repository. peterlee pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-compress.git
The following commit(s) were added to refs/heads/master by this push: new 86bb35a fix for signature detect 86bb35a is described below commit 86bb35aa4e92da6c3c9e78551dffc3fb0193caab Author: PeterAlfredLee <peteralfred...@gmail.com> AuthorDate: Mon Aug 17 17:14:17 2020 +0800 fix for signature detect fix for problems in signature detecting of Central Directory File Signature --- .../apache/commons/compress/archivers/zip/ZipArchiveInputStream.java | 2 +- 1 file changed, 1 insertion(+), 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 66fd17b..32bb562 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 @@ -990,7 +990,7 @@ public class ZipArchiveInputStream extends ArchiveInputStream implements InputSt int expectDDPos = i; 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])) { + || (buf.array()[i + 2] == CFH[2] && buf.array()[i + 3] == CFH[3])) { // found a LFH or CFH: expectDDPos = i - expectedDDLen; done = true;