aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2022-02-19 22:41:22 +0000
committerPJ Fanning <fanningpj@apache.org>2022-02-19 22:41:22 +0000
commitac58e2f5f459d305f87ec2323228947877de11ae (patch)
tree5446a70dfea5e25144bf8e364b7104c1bf3966f8
parent699d71e5245df9e13299081f13e240214e690159 (diff)
downloadpoi-ac58e2f5f459d305f87ec2323228947877de11ae.tar.gz
poi-ac58e2f5f459d305f87ec2323228947877de11ae.zip
add extra max size config
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898239 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipArchiveFakeEntry.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipArchiveFakeEntry.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipArchiveFakeEntry.java
index 807159ba0d..34b28ab662 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipArchiveFakeEntry.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipArchiveFakeEntry.java
@@ -78,7 +78,8 @@ import org.apache.poi.util.TempFile;
}
// Grab the de-compressed contents for later
- data = (entrySize == -1) ? IOUtils.toByteArray(inp) : IOUtils.toByteArray(inp, (int)entrySize, MAX_ENTRY_SIZE);
+ data = (entrySize == -1) ? IOUtils.toByteArrayWithMaxLength(inp, getMaxEntrySize()) :
+ IOUtils.toByteArray(inp, (int)entrySize, getMaxEntrySize());
}
}