From: Nick Burch Date: Tue, 21 Sep 2010 11:54:05 +0000 (+0000) Subject: Fix 1.6ism X-Git-Tag: REL_3_7_BETA3~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e66079ef4883b36773777ee1d5b90095b0e67b24;p=poi.git Fix 1.6ism git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@999349 13f79535-47bb-0310-9956-ffa450edef68 --- 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 {