Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.1.0, 0.2.0, 0.3.0, 0.4.0
-
None
Description
The function:
public int read() throws IOException {
synchronized (b) {
int l = read(b, 0, 1);
if (l == -1)
return b[0];
}
}
Will return negative values for negative bytes. It must read:
public int read() throws IOException {
synchronized (b) {
int l = read(b, 0, 1);
if (l == -1) { return -1; }
return ((int)b[0] & 0xff);
}
}
instead to return values in the range of 0-255 per java.io.InputStream read()
Attachments
Issue Links
- is duplicated by
-
SSHD-84 ChannelPipedInputStream.read() incorrect sign extension in result
- Closed