Commit 022409e9 authored by Andreas Schneider's avatar Andreas Schneider

channels: Fix ssh_channel_poll_timeout() not returing available bytes

Fixes T211
Signed-off-by: Andreas Schneider's avatarAndreas Schneider <[email protected]>
Reviewed-by: Jakub Jelen's avatarJakub Jelen <[email protected]>
Reviewed-by: Anderson Sasaki's avatarAnderson Toshiyuki Sasaki <[email protected]>
parent 07f571f1
Pipeline #111656311 passed with stage
in 41 minutes and 32 seconds
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment