jmestwa-coder commented on code in PR #1103:
URL: https://github.com/apache/poi/pull/1103#discussion_r3348237378
##########
poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusPath.java:
##########
@@ -60,6 +61,21 @@ public enum EmfPlusPathPointType {
@SuppressWarnings("unused")
public static class EmfPlusPath implements EmfPlusObjectData,
EmfPlusCompressed, EmfPlusRelativePosition {
+ /**
+ * The maximum number of points (and associated point types) we
allocate for a single path.
+ * PointCount is an untrusted 32-bit field, so cap it before it is
used as an array length -
+ * consistent with e.g. {@code HemfPlusDraw.MAX_OBJECT_SIZE} and
{@code HemfDraw.MAX_NUMBER_OF_POLYGONS}.
+ */
+ private static final int DEFAULT_MAX_POINTS = 1_000_000;
+ private static int MAX_POINTS = DEFAULT_MAX_POINTS;
+
+ /**
+ * @param maxPoints the maximum number of points allowed for a single
path
+ */
Review Comment:
Added a matching getter as suggested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]