Satish Mittal and David J Sullivan fixed an infinit recv() loop in

libssh2_banner_receive()
This commit is contained in:
Daniel Stenberg 2007-08-08 21:43:12 +00:00
parent a227554c26
commit e32ff531a3
2 changed files with 15 additions and 7 deletions

6
NEWS
View File

@ -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
------------
Changes since previous version include:

View File

@ -135,16 +135,18 @@ libssh2_banner_receive(LIBSSH2_SESSION * session)
if (errno == EAGAIN) {
session->banner_TxRx_total_send = banner_len;
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)
continue;
if (ret == 0) {
session->socket_state = LIBSSH2_SOCKET_DISCONNECTED;
return PACKET_FAIL;
}
if (c == '\0') {
/* NULLs are not allowed in SSH banners */