]> source.dussan.org Git - poi.git/commitdiff
add extra max size config
authorPJ Fanning <fanningpj@apache.org>
Sat, 19 Feb 2022 22:41:22 +0000 (22:41 +0000)
committerPJ Fanning <fanningpj@apache.org>
Sat, 19 Feb 2022 22:41:22 +0000 (22:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898239 13f79535-47bb-0310-9956-ffa450edef68

poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipArchiveFakeEntry.java

index 807159ba0d911a36559bace72f040ea2320149ae..34b28ab66296f30fed35f503a93f50f68b7b3ffa 100644 (file)
@@ -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());
         }
     }