pjfanning opened a new pull request, #1411:
URL: https://github.com/apache/poi/pull/1411

   Follow-up to #1407 and #1408.
   
   `PICT` and `HemfEmbeddedIterator` presize their output buffer from a size in 
the file header (`wmfSize` and `totalObjectSize`). The only cap was the max 
record length, 100 MB by default, so a record of a few bytes could still force 
a 100 MB allocation up front.
   
   Both presizes are now capped at 4 MiB:
   
   - Anything up to 4 MiB still fits in a single buffer.
   - Larger metafiles and images are still supported, because the buffer grows 
as data is read.
   - The max-record-length checks are unchanged.
   
   `HemfFill.readBitmap` is already capped at 
`HemfPicture.getMaxRecordLength()` (1 MB) since #1408.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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