sahvx655-wq opened a new pull request, #510: URL: https://github.com/apache/felix-dev/pull/510
Fixes an `ArrayIndexOutOfBoundsException` in `Pipe.isTty(int fd)` when the file descriptor index `fd` is equal to or greater than the `streams` array length. The boundary check in `Pipe.isTty` used `fd > streams.length` instead of `fd >= streams.length`. Because Java arrays are 0-indexed, checking `fd` at `streams.length` bypassed the check and threw an `ArrayIndexOutOfBoundsException` when accessing `streams[fd]`. - Updated the check to `fd >= streams.length` to safely return `false` on out-of-bounds descriptors. - Added `testIsTtyOutOfBounds` in `TestParser.java` and verified the build passes successfully. -- 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]
