jmestwa-coder commented on code in PR #1103:
URL: https://github.com/apache/poi/pull/1103#discussion_r3343045662


##########
poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusPath.java:
##########
@@ -60,6 +61,13 @@ 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 MAX_POINTS = 1_000_000;

Review Comment:
   Updated 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]

Reply via email to