aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/util/IOUtils.java
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2015-07-20 14:03:35 +0000
committerDominik Stadler <centic@apache.org>2015-07-20 14:03:35 +0000
commitdbdbb0cfe693f8a55aff7f287fc4b7ba071c6e56 (patch)
treec5590ee35e758e7a57facbe27d2bce57414f0406 /src/java/org/apache/poi/util/IOUtils.java
parentee3925aff1996f68442ae366feff4cd30d525c21 (diff)
downloadpoi-dbdbb0cfe693f8a55aff7f287fc4b7ba071c6e56.tar.gz
poi-dbdbb0cfe693f8a55aff7f287fc4b7ba071c6e56.zip
Bug 58156: Possible data corruption in hasPOIFSHeader and hasOOXMLHeader
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691948 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/util/IOUtils.java')
-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 f1d5a2378d..b5f22a1a1a 100644
--- a/src/java/org/apache/poi/util/IOUtils.java
+++ b/src/java/org/apache/poi/util/IOUtils.java
@@ -57,7 +57,7 @@ public final class IOUtils {
// Wind back those 8 bytes
if(stream instanceof PushbackInputStream) {
PushbackInputStream pin = (PushbackInputStream)stream;
- pin.unread(header);
+ pin.unread(header, 0, read);
} else {
stream.reset();
}