mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-05 04:40:31 +09:00
channels: Fix ssh_channel_poll_timeout() not returing available bytes
Fixes T211 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
This commit is contained in:
@@ -3119,6 +3119,11 @@ int ssh_channel_poll_timeout(ssh_channel channel, int timeout, int is_stderr)
|
||||
}
|
||||
len = ssh_buffer_get_len(stdbuf);
|
||||
if (len > 0) {
|
||||
if (len > INT_MAX) {
|
||||
rc = SSH_ERROR;
|
||||
} else {
|
||||
rc = (int)len;
|
||||
}
|
||||
goto out;
|
||||
}
|
||||
if (channel->remote_eof) {
|
||||
|
||||
Reference in New Issue
Block a user