sanity check that WOLFSSH struct has handshake info

pull/128/head
Jacob Barthelmeh 2018-12-12 13:34:18 -07:00
parent 3994d0f538
commit 7911c70349
1 changed files with 2 additions and 1 deletions

View File

@ -2229,7 +2229,8 @@ static int DoKexDhInit(WOLFSSH* ssh, byte* buf, word32 len, word32* idx)
word32 begin;
int ret = WS_SUCCESS;
if (ssh == NULL || buf == NULL || len == 0 || idx == NULL)
if (ssh == NULL || ssh->handshake == NULL || buf == NULL || len == 0 ||
idx == NULL)
ret = WS_BAD_ARGUMENT;
if (ret == WS_SUCCESS) {