jmestwa-coder opened a new pull request, #1060:
URL: https://github.com/apache/poi/pull/1060

   ## Summary
   
   Validate EMF header description offset/count values before performing skip 
and allocation operations.
   
   The parser previously used externally controlled values in arithmetic 
related to stream positioning and buffer allocation without validating the 
computed ranges first. This change switches the calculations to `long` 
arithmetic, validates derived bounds against the record size, and uses 
`IOUtils.safelyAllocate` for safer allocation handling.
   
   ## Changes
   
   - Use `long` arithmetic for EMF description calculations
   - Validate derived description bounds before skip/allocation operations
   - Prevent overflowed allocation and invalid stream positioning
   - Replace raw allocation with `IOUtils.safelyAllocate`
   - Add regression test covering overflowing description count values
   - Add non-regression test verifying valid UTF-16LE descriptions still parse 
correctly


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