You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by pe...@apache.org on 2020/08/15 03:37:41 UTC

[commons-compress] branch master updated: COMPRESS-542 : record change

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 5fc625d  COMPRESS-542 : record change
5fc625d is described below

commit 5fc625d91c883f3e7c99f9e27ab78ffdbb3f5ae9
Author: PeterAlfredLee <pe...@gmail.com>
AuthorDate: Sat Aug 15 11:36:44 2020 +0800

    COMPRESS-542 : record change
    
    Record change for Compress-542 with PR#120
---
 src/changes/changes.xml                                      | 12 ++++++++++--
 .../apache/commons/compress/archivers/sevenz/SevenZFile.java |  2 +-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 4301093..ad224f7 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -169,14 +169,22 @@ The <action> type attribute can be add,update,fix,remove.
       <action type="update" date="2020-08-10" due-to="Dependabot" dev="ggregory">
         Update GitHub actions/checkout from v1 to v2.3.1 #114, #124.
       </action>
-      <action issue="COMPRESS-543" type="fix" date="2020-08-10" due-to="wulf2333" dev="PeterLee">
+      <action issue="COMPRESS-543" type="fix" date="2020-08-10"
+              due-to="wulf2333" dev="PeterLee">
         Fix for test fails on Windows. The tests are failing because the
         default charset is not UTF-8.
       </action>
-      <action issue="COMPRESS-544" type="fix" date="2020-08-13" due-to="Aditya Prasad" dev="PeterLee">
+      <action issue="COMPRESS-544" type="fix" date="2020-08-13"
+              due-to="Aditya Prasad" dev="PeterLee">
         TarArchiveInputStream can not detect a truncated tar in skip()
         and skipRecordPadding().
       </action>
+      <action issue="COMPRESS-542" type="fix" date="2020-08-15"
+              due-to="theobisproject" dev="theobisproject">
+        Make the memory allocation in SevenZFile.readFilesInfo a lazy
+        allocation to avoid OOM when dealing some giant 7z archives.
+        Github Pull Request #120.
+      </action>
     </release>
     <release version="1.20" date="2020-02-08"
              description="Release 1.20">
diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
index aacf34a..bbbca55 100644
--- a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
+++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
@@ -976,7 +976,7 @@ public class SevenZFile implements Closeable {
                         throw new IOException("File names length invalid");
                     }
                     assertFitsIntoInt("file names length", size - 1);
-                    final byte[] names = new byte[(int)(size - 1)];
+                    final byte[] names = new byte[(int) (size - 1)];
                     header.get(names);
                     int nextFile = 0;
                     int nextName = 0;