aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi
diff options
context:
space:
mode:
authorTim Allison <tallison@apache.org>2020-06-22 20:23:19 +0000
committerTim Allison <tallison@apache.org>2020-06-22 20:23:19 +0000
commitf28dc4d0ad1529652e7f777f1321928a4c2beff0 (patch)
tree157716887593ff8eef20591332c99dd27a8cfb02 /src/java/org/apache/poi
parentb4b5603318f1cc9870f50a5498fd94194f491bfd (diff)
downloadpoi-f28dc4d0ad1529652e7f777f1321928a4c2beff0.tar.gz
poi-f28dc4d0ad1529652e7f777f1321928a4c2beff0.zip
improve memory safety in HWPFDocumentCore
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879097 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi')
-rw-r--r--src/java/org/apache/poi/util/IOUtils.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/java/org/apache/poi/util/IOUtils.java b/src/java/org/apache/poi/util/IOUtils.java
index 26f461f12d..68f5bbddc5 100644
--- a/src/java/org/apache/poi/util/IOUtils.java
+++ b/src/java/org/apache/poi/util/IOUtils.java
@@ -188,7 +188,7 @@ public final class IOUtils {
baos.write(buffer, 0, readBytes);
}
- checkByteSizeLimit(readBytes);
+ checkByteSizeLimit(totalBytes);
} while (totalBytes < len && readBytes > -1);
if (maxLength != Integer.MAX_VALUE && totalBytes == maxLength) {