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
The following commit(s) were added to refs/heads/master by this push: new 5761493 COMPRESS-542 each folder requires at least one coder 5761493 is described below commit 5761493cbaf7a7d608a3b68f4d61aaa822dbeb4f Author: Stefan Bodewig <stefan.bode...@innoq.com> AuthorDate: Sun May 16 18:20:23 2021 +0200 COMPRESS-542 each folder requires at least one coder --- .../java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java | 3 +++ 1 file changed, 3 insertions(+) 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 e26cd96..39d8b82 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 @@ -1083,6 +1083,9 @@ public class SevenZFile implements Closeable { throws IOException { final int numCoders = assertFitsIntoNonNegativeInt("numCoders", readUint64(header)); + if (numCoders == 0) { + throw new IOException("Folder without coders"); + } stats.numberOfCoders += numCoders; long totalOutStreams = 0;