diff --git a/src/kex.c b/src/kex.c index 99d7a9c3..6a34a712 100644 --- a/src/kex.c +++ b/src/kex.c @@ -1928,12 +1928,13 @@ static int ecdh_sha2_nistp(LIBSSH2_SESSION *session, libssh2_curve_type type, { int ret = 0; int rc; - - if(data_len < 5) {ret = _libssh2_error(session, LIBSSH2_ERROR_HOSTKEY_INIT, + + if(data_len < 5) { + ret = _libssh2_error(session, LIBSSH2_ERROR_HOSTKEY_INIT, "Host key data is too short"); return ret; } - + if(exchange_state->state == libssh2_NB_state_idle) { /* Setup initial values */