Author: kiwiwings
Date: Sun Apr 26 21:38:14 2020
New Revision: 1877044
URL: http://svn.apache.org/viewvc?rev=1877044&view=rev
Log:
Throw exception on null/placeholder arrays in TNEF
Modified:
poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIAttribute.java
Modified:
poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIAttribute.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIAttribute.java?rev=1877044&r1=1877043&r2=1877044&view=diff
==============================================================================
---
poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIAttribute.java
(original)
+++
poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIAttribute.java
Sun Apr 26 21:38:14 2020
@@ -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);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]