Satish Mittal and David J Sullivan fixed an infinit recv() loop in
libssh2_banner_receive()
This commit is contained in:
parent
a227554c26
commit
e32ff531a3
6
NEWS
6
NEWS
@ -1,3 +1,9 @@
|
|||||||
|
Version 0.18
|
||||||
|
------------
|
||||||
|
|
||||||
|
- Satish Mittal and David J Sullivan fixed an infinit recv() loop in
|
||||||
|
libssh2_banner_receive()
|
||||||
|
|
||||||
Version 0.17
|
Version 0.17
|
||||||
------------
|
------------
|
||||||
Changes since previous version include:
|
Changes since previous version include:
|
||||||
|
@ -135,16 +135,18 @@ libssh2_banner_receive(LIBSSH2_SESSION * session)
|
|||||||
if (errno == EAGAIN) {
|
if (errno == EAGAIN) {
|
||||||
session->banner_TxRx_total_send = banner_len;
|
session->banner_TxRx_total_send = banner_len;
|
||||||
return PACKET_EAGAIN;
|
return PACKET_EAGAIN;
|
||||||
} else {
|
|
||||||
/* Some kinda error */
|
|
||||||
session->banner_TxRx_state = libssh2_NB_state_idle;
|
|
||||||
session->banner_TxRx_total_send = 0;
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Some kinda error */
|
||||||
|
session->banner_TxRx_state = libssh2_NB_state_idle;
|
||||||
|
session->banner_TxRx_total_send = 0;
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret <= 0)
|
if (ret == 0) {
|
||||||
continue;
|
session->socket_state = LIBSSH2_SOCKET_DISCONNECTED;
|
||||||
|
return PACKET_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
if (c == '\0') {
|
if (c == '\0') {
|
||||||
/* NULLs are not allowed in SSH banners */
|
/* NULLs are not allowed in SSH banners */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user