The GitHub Actions job "CodeQL" on commons-io.git/bugfix/ubais-skip-past-eof has failed. Run started by GitHub user simpleqt (triggered by simpleqt).
Head commit for run: 0e2daa6a330e2229585cabb17a8fe6725c0f3a38 / simpleqt <[email protected]> Fix UnsynchronizedByteArrayInputStream.skip() past end of stream UnsynchronizedByteArrayInputStream.skip(long) advanced the current offset by the requested skip count instead of the clamped actual skip count. Skipping past the end of stream left the position beyond the end of data, so subsequent skip(long) calls returned negative counts, violating the InputStream#skip contract, and skip counts larger than Integer.MAX_VALUE threw ArithmeticException from Math.toIntExact(long) instead of skipping to the end of data. The position now advances by the clamped, non-negative actual skip count only, matching java.io.ByteArrayInputStream semantics. New testSkipPastEndOfStream() fails on the previous code (skip(1) returned -996 after skip(999); skip(Long.MAX_VALUE) threw ArithmeticException) and passes with this fix. Signed-off-by: simpleqt <[email protected]> Report URL: https://github.com/apache/commons-io/actions/runs/41402436418 With regards, GitHub Actions via GitBox
