diff options
author | PJ Fanning <fanningpj@apache.org> | 2022-03-12 09:31:44 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2022-03-12 09:31:44 +0000 |
commit | 01e566663347f358a8b10b16ec1f03e988d15a7d (patch) | |
tree | 223f4de55fbc55c8d9082e8157e326ca753edd40 | |
parent | cbdf6d2330197b892eb03411bcb4e9ebe6f81337 (diff) | |
download | poi-01e566663347f358a8b10b16ec1f03e988d15a7d.tar.gz poi-01e566663347f358a8b10b16ec1f03e988d15a7d.zip |
fix issue in IOUtils.toByteArrayWithMaxLength
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898871 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | poi/src/main/java/org/apache/poi/util/IOUtils.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/poi/src/main/java/org/apache/poi/util/IOUtils.java b/poi/src/main/java/org/apache/poi/util/IOUtils.java index 34fac68a58..7e1fef8990 100644 --- a/poi/src/main/java/org/apache/poi/util/IOUtils.java +++ b/poi/src/main/java/org/apache/poi/util/IOUtils.java @@ -406,7 +406,7 @@ public final class IOUtils { long totalCount = 0; int readBytes = -1; do { - int todoBytes = (int)((limit < 0) ? buff.length : Math.min(limit-totalCount, buff.length)); + int todoBytes = (int)((limit < 0) ? DEFAULT_BUFFER_SIZE : Math.min(limit-totalCount, DEFAULT_BUFFER_SIZE)); if (todoBytes > 0) { readBytes = inp.read(buff, 0, todoBytes); if (readBytes > 0) { |