diff options
Diffstat (limited to 'poi-scratchpad/src/main')
-rw-r--r-- | poi-scratchpad/src/main/java/org/apache/poi/hmef/attribute/MAPIAttribute.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hmef/attribute/MAPIAttribute.java b/poi-scratchpad/src/main/java/org/apache/poi/hmef/attribute/MAPIAttribute.java index a5f797220e..f851526ea3 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hmef/attribute/MAPIAttribute.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hmef/attribute/MAPIAttribute.java @@ -43,6 +43,7 @@ public class MAPIAttribute { //arbitrarily selected; may need to increase private static final int DEFAULT_MAX_RECORD_LENGTH = 1_000_000; private static int MAX_RECORD_LENGTH = 1_000_000; + private static int MAX_RECORD_COUNT = 10_000; private final MAPIProperty property; private final int type; @@ -183,6 +184,7 @@ public class MAPIAttribute { int values = 1; if(isMV || isVL) { values = LittleEndian.readInt(inp); + IOUtils.safelyAllocateCheck(values, MAX_RECORD_COUNT); } if (type == Types.NULL && values > 1) { |