Re: [PR] apply allocation bounds check to EmfExtCreatePen st yle entries [poi]
pjfanning (via GitHub) <[email protected]>
| Newsgroups | gmane.comp.jakarta.poi.devel |
|---|---|
| Message-ID | <PR_kwDOAAMmIM7ikTM6-e7922459-1d96-477f-bae3-2e4d4ca072f2@gitbox.apache.org> |
pjfanning commented on code in PR #1113:
URL: https://github.com/apache/poi/pull/1113#discussion_r3354913559
##########
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:
this seems bad - why use use hwmf limit in hemf?
--
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]