metsw24-max commented on code in PR #1113:
URL: https://github.com/apache/poi/pull/1113#discussion_r3356020482


##########
poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emf/HemfMisc.java:
##########
@@ -624,6 +626,7 @@ public long init(LittleEndianInputStream leis, long 
recordSize, long recordId) t
             // If the pen type in the PenStyle field is PS_GEOMETRIC, the 
lengths are specified in logical
             // units; otherwise, the lengths are specified in device units.
 
+            IOUtils.safelyAllocateCheck(numStyleEntries, 
HwmfPicture.getMaxRecordLength());

Review Comment:
   good catch, that was reaching into the hwmf limit by mistake. now that #1114 
has landed the hemf-specific limit i've rebased and switched this to 
HemfPicture.safelyAllocateCheck, same as the polyline decoder in HemfDraw.



-- 
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