1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

sshd: protect against NULL kex

This commit is contained in:
Andy Green 2017-12-07 20:29:49 +08:00
parent 248b089ad4
commit 8ff7dce46d

View file

@ -634,6 +634,10 @@ again:
pss->parser_state = SSH_KEX_STATE_SKIP;
break;
}
if (!pss->kex) {
lwsl_notice("%s: SSH_MSG_KEXINIT: NULL pss->kex\n", __func__);
goto bail;
}
pss->parser_state = SSH_KEX_STATE_COOKIE;
pss->kex->I_C_payload_len = 0;
pss->kex->I_C_alloc_len = pss->msg_len;