channels: Fix possible infinite loop in channel_read().
Этот коммит содержится в:
родитель
d1df255df4
Коммит
66188f1af8
@ -2439,6 +2439,7 @@ int ssh_channel_read(ssh_channel channel, void *dest, uint32_t count, int is_std
|
||||
ssh_session session;
|
||||
ssh_buffer stdbuf;
|
||||
uint32_t len;
|
||||
int rc;
|
||||
|
||||
if(channel == NULL) {
|
||||
return SSH_ERROR;
|
||||
@ -2497,7 +2498,10 @@ int ssh_channel_read(ssh_channel channel, void *dest, uint32_t count, int is_std
|
||||
break;
|
||||
}
|
||||
|
||||
ssh_handle_packets(session, -2);
|
||||
rc = ssh_handle_packets(session, -2);
|
||||
if (rc != SSH_OK) {
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
len = buffer_get_rest_len(stdbuf);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user