You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by lg...@apache.org on 2017/08/23 17:25:35 UTC
mina-sshd git commit: [SSHD-765] SFTP client fails to retrieve a
binary file using an InputStream
Repository: mina-sshd
Updated Branches:
refs/heads/master 83b2a0177 -> b3c8181e8
[SSHD-765] SFTP client fails to retrieve a binary file using an InputStream
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/b3c8181e
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/b3c8181e
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/b3c8181e
Branch: refs/heads/master
Commit: b3c8181e88de8e0d6c279e45cd5a9ee544d35d1d
Parents: 83b2a01
Author: Michael Binder <mi...@ericsson.com>
Authored: Wed Aug 23 20:25:57 2017 +0300
Committer: Lyor Goldstein <ly...@gmail.com>
Committed: Wed Aug 23 20:26:17 2017 +0300
----------------------------------------------------------------------
.../sshd/client/subsystem/sftp/SftpInputStreamWithChannel.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/b3c8181e/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpInputStreamWithChannel.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpInputStreamWithChannel.java b/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpInputStreamWithChannel.java
index 41ba430..9b4d2c6 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpInputStreamWithChannel.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpInputStreamWithChannel.java
@@ -127,7 +127,7 @@ public class SftpInputStreamWithChannel extends InputStreamWithChannel {
public int read() throws IOException {
int read = read(bb, 0, 1);
if (read > 0) {
- return bb[0];
+ return bb[0] & 0xFF;
}
return read;