Browse Source

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
tags/before_ooxml_3rd_edition
Andreas Beeker 4 years ago
parent
commit
23acaff78d

+ 5
- 0
src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIAttribute.java View File

if(isMV || isVL) { if(isMV || isVL) {
values = LittleEndian.readInt(inp); 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++) { for(int j=0; j<values; j++) {
int len = getLength(type, inp); int len = getLength(type, inp);
byte[] data = IOUtils.safelyAllocate(len, MAX_RECORD_LENGTH); byte[] data = IOUtils.safelyAllocate(len, MAX_RECORD_LENGTH);

Loading…
Cancel
Save