AryanRG opened a new pull request, #562: URL: https://github.com/apache/commons-imaging/pull/562
## Summary `BinaryFunctions.searchQuad` compares signed Java bytes with unsigned `InputStream.read()` values and drops a partial match when the mismatching byte could start the next match. This can miss a quad containing high-bit bytes or an overlapping prefix. Use a four-byte sliding window to compare the complete sequence. Add regressions for high-bit bytes, overlapping matches, short/non-matching streams, and the stream position after a match. Add an `IMAGING-389` change entry. Jira: https://issues.apache.org/jira/browse/IMAGING-389 ## Validation - Focused `BinaryFunctionsTest` and full `mvn -q verify` passed locally. - The default Maven build (`mvn`) previously passed on the same final file tree; a fresh `mvn -q` run also passed. ## Contributor checklist - [x] Read the project contribution guidelines. - [x] Read the ASF Generative Tooling Guidance. - [x] AI assistance used: Kiro Opus 5.5 helped identify the defect, prepare the code and tests, and perform an independent automated review. The Maven results above were checked locally. - [x] Run the default Maven build. - [x] Add unit tests for the behavioral change. - [x] Explain the what, how, and why of the change. - [x] Use a meaningful issue-linked commit subject and body. -- 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]
