diff options
author | Nick Burch <nick@apache.org> | 2010-09-21 11:54:05 +0000 |
---|---|---|
committer | Nick Burch <nick@apache.org> | 2010-09-21 11:54:05 +0000 |
commit | e66079ef4883b36773777ee1d5b90095b0e67b24 (patch) | |
tree | 66fa282810617854e2d019240905bbf7ef2cc459 /src/java/org/apache/poi/poifs/filesystem/Ole10Native.java | |
parent | 7d7bdeb2aff4f483605b137133fe3356ab35fdc4 (diff) | |
download | poi-e66079ef4883b36773777ee1d5b90095b0e67b24.tar.gz poi-e66079ef4883b36773777ee1d5b90095b0e67b24.zip |
Fix 1.6ism
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@999349 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/poifs/filesystem/Ole10Native.java')
-rw-r--r-- | src/java/org/apache/poi/poifs/filesystem/Ole10Native.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/java/org/apache/poi/poifs/filesystem/Ole10Native.java b/src/java/org/apache/poi/poifs/filesystem/Ole10Native.java index fcf61caa0f..488bfb3053 100644 --- a/src/java/org/apache/poi/poifs/filesystem/Ole10Native.java +++ b/src/java/org/apache/poi/poifs/filesystem/Ole10Native.java @@ -106,7 +106,10 @@ public class Ole10Native { dataBuffer = new byte[totalSize-4];
System.arraycopy(data, 4, dataBuffer, 0, dataBuffer.length);
dataSize = totalSize - 4;
- label = "ole-"+ HexDump.toHex(Arrays.copyOf(dataBuffer, 8));
+
+ byte[] oleLabel = new byte[8];
+ System.arraycopy(dataBuffer, 0, oleLabel, 0, Math.min(dataBuffer.length, 8));
+ label = "ole-"+ HexDump.toHex(oleLabel);
fileName = label;
command = label;
} else {
|