Marti2203 opened a new pull request, #579: URL: https://github.com/apache/commons-imaging/pull/579
Fixes [IMAGING-396](https://issues.apache.org/jira/browse/IMAGING-396). Malformed input made four parsers throw unchecked exceptions instead of `ImagingException`: - WBMP: `rowLength * height` overflowed `int` (`IllegalArgumentException`). The size is now computed in `long` and rejected above `Integer.MAX_VALUE`. - PNG: an empty sCAL chunk (`ArrayIndexOutOfBoundsException`). It is now rejected. - XPM: end of input where a string is expected (`NullPointerException`). The token is now checked for null. - IPTC: a block ending inside a record header (`ArrayIndexOutOfBoundsException`). Reading stops there, as it already does for an unexpected tag marker. The new `MalformedInputTest` (4 tests, small base64 inputs) fails 4/4 without the change and passes with it. `mvn -B verify checkstyle:check pmd:check` passes (1263 tests, 0 failures). This issue was found by an LLM-Enhanced Static Analysis Engine and verified manually. The patch and this description were prepared with AI assistance (Claude Code) and reviewed by me; the commit carries an `Assisted-By:` trailer. -- 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]
