aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2020-04-26 21:38:14 +0000
committerAndreas Beeker <kiwiwings@apache.org>2020-04-26 21:38:14 +0000
commit23acaff78d1e2a08a879a1422e4ed18ff6290e12 (patch)
tree26d6e0fe1af8d5817493e220cb4a3e397f223b2b /src
parent979d1b48e7a057dbfd29af6bbe0dabad0adec65a (diff)
downloadpoi-23acaff78d1e2a08a879a1422e4ed18ff6290e12.tar.gz
poi-23acaff78d1e2a08a879a1422e4ed18ff6290e12.zip
Throw exception on null/placeholder arrays in TNEF
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1877044 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIAttribute.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIAttribute.java b/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIAttribute.java
index 695822909a..0533705c2e 100644
--- a/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIAttribute.java
+++ b/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIAttribute.java
@@ -166,6 +166,11 @@ public class MAPIAttribute {
if(isMV || isVL) {
values = LittleEndian.readInt(inp);
}
+
+ if (type == Types.NULL && values > 1) {
+ throw new IOException("Placeholder/NULL arrays aren't supported.");
+ }
+
for(int j=0; j<values; j++) {
int len = getLength(type, inp);
byte[] data = IOUtils.safelyAllocate(len, MAX_RECORD_LENGTH);