From 7911c7034971be65f90b52cb020c6e4688e089fc Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Wed, 12 Dec 2018 13:34:18 -0700 Subject: [PATCH] sanity check that WOLFSSH struct has handshake info --- src/internal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/internal.c b/src/internal.c index 8d896e4..57d95d6 100644 --- a/src/internal.c +++ b/src/internal.c @@ -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) {