commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject commons-compress git commit: COMPRESS-344 accept NUL as terminator for GNU extended names
Date Tue, 22 Mar 2016 17:16:35 GMT
Repository: commons-compress
Updated Branches:
  refs/heads/master 9ff8334ff -> a5eca5683


COMPRESS-344 accept NUL as terminator for GNU extended names


Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/a5eca568
Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/a5eca568
Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/a5eca568

Branch: refs/heads/master
Commit: a5eca568368b287f875149133a7ff6029b07aad8
Parents: 9ff8334
Author: Stefan Bodewig <bodewig@apache.org>
Authored: Tue Mar 22 18:14:07 2016 +0100
Committer: Stefan Bodewig <bodewig@apache.org>
Committed: Tue Mar 22 18:14:56 2016 +0100

----------------------------------------------------------------------
 src/changes/changes.xml                                          | 4 ++++
 .../commons/compress/archivers/ar/ArArchiveInputStream.java      | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/a5eca568/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index d9929f6..8efd3d3 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -44,6 +44,10 @@ The <action> type attribute can be add,update,fix,remove.
   <body>
     <release version="1.11" date="not released, yet"
              description="Release 1.11">
+      <action issue="COMPRESS-344" type="fix" date="2016-03-22">
+        ArArchiveInputStream can now read GNU extended names that are
+        terminated with a NUL byte rather than a linefeed.
+      </action>
       <action issue="COMPRESS-341" type="add" date="2016-03-20">
         New method SevenZFile.getEntries can be used to list the
         contents of a 7z archive.

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/a5eca568/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
index 79bcceb..6298bc3 100644
--- a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
@@ -177,7 +177,7 @@ public class ArArchiveInputStream extends ArchiveInputStream {
             throw new IOException("Cannot process GNU long filename as no // record was found");
         }
         for(int i=offset; i < namebuffer.length; i++){
-            if (namebuffer[i]=='\012'){
+            if (namebuffer[i] == '\012' || namebuffer[i] == 0){
                 if (namebuffer[i-1]=='/') {
                     i--; // drop trailing /
                 }


Mime
View raw message