1
1

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>
Этот коммит содержится в:
Andreas Schneider 2019-10-31 11:16:21 +01:00
родитель fbe115abba
Коммит 3bad060738

Просмотреть файл

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