Marti2203 opened a new pull request, #576: URL: https://github.com/apache/commons-imaging/pull/576
Fixes [IMAGING-394](https://issues.apache.org/jira/browse/IMAGING-394). `RgbeInfo.decompress()` checked for the end of the stream only at a run's count byte: a run's value and literal bytes were stored from `in.read()` unchecked, so a truncated HDR decoded silently with 0xFF bytes, and a run longer than the rest of the scan line threw `ArrayIndexOutOfBoundsException`. Both now throw an `ImagingException`. `RgbeParserTest.testTruncatedAndOverlongRuns` decodes a complete 4x1 image, the same image cut off inside its last run, and a scan line with an overlong run; it fails without the change. The RGBE tests and `mvn -B -DskipTests -DskipITs` pass. 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]
