Commit 3bad0607 authored by Andreas Schneider's avatar Andreas Schneider

channels: Use a size_t variable for length check

Fixes T188
Signed-off-by: Andreas Schneider's avatarAndreas Schneider <[email protected]>
Reviewed-by: Jakub Jelen's avatarJakub Jelen <[email protected]>
parent fbe115ab
......@@ -3082,6 +3082,7 @@ int ssh_channel_poll_timeout(ssh_channel channel, int timeout, int is_stderr)
ssh_session session;
ssh_buffer stdbuf;
struct ssh_channel_read_termination_struct ctx;
size_t len;
int rc;
if(channel == NULL) {
......@@ -3106,8 +3107,8 @@ int ssh_channel_poll_timeout(ssh_channel channel, int timeout, int is_stderr)
rc = SSH_ERROR;
goto out;
}
rc = ssh_buffer_get_len(stdbuf);
if(rc > 0) {
len = ssh_buffer_get_len(stdbuf);
if (len > 0) {
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