diff options
author | Nick Burch <nick@apache.org> | 2011-04-21 15:37:22 +0000 |
---|---|---|
committer | Nick Burch <nick@apache.org> | 2011-04-21 15:37:22 +0000 |
commit | 8e0241ff83a8886f64fecd7ea052d450dbec5b78 (patch) | |
tree | b98cdc970a6e610c626e070ccc80530157a51ad6 /src/java | |
parent | 11a75497e546c6f190fa684681b36f5e1e475aad (diff) | |
download | poi-8e0241ff83a8886f64fecd7ea052d450dbec5b78.tar.gz poi-8e0241ff83a8886f64fecd7ea052d450dbec5b78.zip |
Fix bug #51100 - Fix IOUtils issue for NPOIFS reading from an InputStream where every block is full
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1095753 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/org/apache/poi/util/IOUtils.java | 2 |
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 c3c8fa1ac9..d67bde2643 100644 --- a/src/java/org/apache/poi/util/IOUtils.java +++ b/src/java/org/apache/poi/util/IOUtils.java @@ -110,7 +110,7 @@ public final class IOUtils { return (total == 0) ? -1 : total; } total += got; - if (total == b.capacity()) { + if (total == b.capacity() || b.position() == b.capacity()) { return total; } } |