[PR] Apply allocation bounds checks to EMF+ path and brush ele ment counts [poi]

jmestwa-coder (via GitHub) <[email protected]>
Newsgroups gmane.comp.jakarta.poi.devel
Message-ID <[email protected]>
jmestwa-coder opened a new pull request, #1104:
URL: https://github.com/apache/poi/pull/1104

   ## Summary
   
   EMF+ path and brush records allocate arrays directly from count fields read from the input stream.
   
   This change applies the existing POI allocation safety checks before the following count-driven allocations:
   
   - Path point arrays in `HemfPlusPath`
   - Surrounding color arrays in `HemfPlusBrush`
   - Boundary point arrays in `HemfPlusBrush`
   - Position arrays in `HemfPlusBrush`
   
   Invalid or excessively large counts are now rejected with `RecordFormatException` instead of attempting oversized allocations.
   
   ## Tests
   
   Added regression tests covering:
   
   - `Integer.MAX_VALUE` counts
   - Negative counts (`0xFFFFFFFF`)
   
   These tests verify that malformed inputs are rejected through the standard allocation validation path.


-- 
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]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.