mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-05 21:00:33 +09: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:
@@ -3082,6 +3082,7 @@ int ssh_channel_poll_timeout(ssh_channel channel, int timeout, int is_stderr)
|
|||||||
ssh_session session;
|
ssh_session session;
|
||||||
ssh_buffer stdbuf;
|
ssh_buffer stdbuf;
|
||||||
struct ssh_channel_read_termination_struct ctx;
|
struct ssh_channel_read_termination_struct ctx;
|
||||||
|
size_t len;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if(channel == NULL) {
|
if(channel == NULL) {
|
||||||
@@ -3106,8 +3107,8 @@ int ssh_channel_poll_timeout(ssh_channel channel, int timeout, int is_stderr)
|
|||||||
rc = SSH_ERROR;
|
rc = SSH_ERROR;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
rc = ssh_buffer_get_len(stdbuf);
|
len = ssh_buffer_get_len(stdbuf);
|
||||||
if(rc > 0) {
|
if (len > 0) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (channel->remote_eof) {
|
if (channel->remote_eof) {
|
||||||
|
|||||||
Reference in New Issue
Block a user