1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

channels: Use a size_t variable for length check

Fixes T188

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Andreas Schneider
2019-10-31 11:16:21 +01:00
parent fbe115abba
commit 3bad060738

View File

@@ -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) {