]> source.dussan.org Git - poi.git/commitdiff
Throw exception on null/placeholder arrays in TNEF
authorAndreas Beeker <kiwiwings@apache.org>
Sun, 26 Apr 2020 21:38:14 +0000 (21:38 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Sun, 26 Apr 2020 21:38:14 +0000 (21:38 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1877044 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIAttribute.java

index 695822909a7961e9e0f3b8ae3d6021271d512f3d..0533705c2e5180695e9e2f0c158049036c500ebd 100644 (file)
@@ -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);