Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
0.3.0
-
None
-
None
Description
java.io.InputStream.read() defines its result as an int in the range 0 to 255 (except EOF which is -1). But current org.apache.sshd.common.channel.ChannelPipedInputStream.read() implementation makes sign extension for byte values greater than 127 (by `return b[0]`). This should be fixed by proper masking of read() result value (`return b[0] & 0xff`).
Attachments
Issue Links
- duplicates
-
SSHD-79 ChannelPipedInputStream returns improper negative values for some bytes.
- Resolved