diff options
Diffstat (limited to 'libs/libssh2/src/session.c')
-rw-r--r-- | libs/libssh2/src/session.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/libssh2/src/session.c b/libs/libssh2/src/session.c index 6352d12ee7..b5a83ddd67 100644 --- a/libs/libssh2/src/session.c +++ b/libs/libssh2/src/session.c @@ -765,6 +765,11 @@ session_startup(LIBSSH2_SESSION *session, libssh2_socket_t sock) if (rc) return rc; + if(session->startup_data_len < 5) { + return _libssh2_error(session, LIBSSH2_ERROR_PROTO, + "Unexpected packet length"); + } + session->startup_service_length = _libssh2_ntohu32(session->startup_data + 1); |