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 2017/07/19 11:18:52 UTC

[1/3] commons-compress git commit: COMPRESS-417 ignore devmajor/minor unless entry is a CHR or BLK device

Repository: commons-compress
Updated Branches:
  refs/heads/master 6081e2630 -> 52cb7925a


COMPRESS-417 ignore devmajor/minor unless entry is a CHR or BLK device


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

Branch: refs/heads/master
Commit: 002d7bf508ee59f23a04a9f21d02e9673dd38a71
Parents: 6081e26
Author: Stefan Bodewig <bo...@apache.org>
Authored: Wed Jul 19 13:15:09 2017 +0200
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Wed Jul 19 13:15:09 2017 +0200

----------------------------------------------------------------------
 .../apache/commons/compress/archivers/tar/TarArchiveEntry.java   | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/002d7bf5/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
index 8595252..a13cf4b 100644
--- a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
@@ -1271,10 +1271,14 @@ public class TarArchiveEntry implements ArchiveEntry, TarConstants {
         groupName = oldStyle ? TarUtils.parseName(header, offset, GNAMELEN)
             : TarUtils.parseName(header, offset, GNAMELEN, encoding);
         offset += GNAMELEN;
+        if (linkFlag == LF_CHR || linkFlag == LF_BLK) {
         devMajor = (int) TarUtils.parseOctalOrBinary(header, offset, DEVLEN);
         offset += DEVLEN;
         devMinor = (int) TarUtils.parseOctalOrBinary(header, offset, DEVLEN);
         offset += DEVLEN;
+        } else {
+            offset += 2 * DEVLEN;
+        }
 
         final int type = evaluateType(header);
         switch (type) {


[3/3] commons-compress git commit: COMPRESS-417 record change

Posted by bo...@apache.org.
COMPRESS-417 record change


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

Branch: refs/heads/master
Commit: 52cb7925a00115867b6ef2d19c9dd9397d2a1e58
Parents: d64f164
Author: Stefan Bodewig <bo...@apache.org>
Authored: Wed Jul 19 13:18:28 2017 +0200
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Wed Jul 19 13:18:28 2017 +0200

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


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/52cb7925/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index f217052..3be8238 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -113,6 +113,11 @@ wanted to create such files.">
         Removed ZipEncoding code that became obsolete when we started
         to require Java5 as baseline long ago.
       </action>
+      <action issue="COMPRESS-417" type="fix" date="2017-07-19">
+        The tar package will no longer try to parse the major and
+        minor device numbers unless the entry represents a character
+        or block special file.
+      </action>
     </release>
     <release version="1.14" date="2017-05-14"
              description="Release 1.14">


[2/3] commons-compress git commit: whitespace

Posted by bo...@apache.org.
whitespace


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

Branch: refs/heads/master
Commit: d64f164b59721f05fa36df04b5d2af89b7af36a9
Parents: 002d7bf
Author: Stefan Bodewig <bo...@apache.org>
Authored: Wed Jul 19 13:17:04 2017 +0200
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Wed Jul 19 13:17:04 2017 +0200

----------------------------------------------------------------------
 .../commons/compress/archivers/tar/TarArchiveEntry.java      | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/d64f164b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
index a13cf4b..312b0a3 100644
--- a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
@@ -1272,10 +1272,10 @@ public class TarArchiveEntry implements ArchiveEntry, TarConstants {
             : TarUtils.parseName(header, offset, GNAMELEN, encoding);
         offset += GNAMELEN;
         if (linkFlag == LF_CHR || linkFlag == LF_BLK) {
-        devMajor = (int) TarUtils.parseOctalOrBinary(header, offset, DEVLEN);
-        offset += DEVLEN;
-        devMinor = (int) TarUtils.parseOctalOrBinary(header, offset, DEVLEN);
-        offset += DEVLEN;
+            devMajor = (int) TarUtils.parseOctalOrBinary(header, offset, DEVLEN);
+            offset += DEVLEN;
+            devMinor = (int) TarUtils.parseOctalOrBinary(header, offset, DEVLEN);
+            offset += DEVLEN;
         } else {
             offset += 2 * DEVLEN;
         }