Skip to content

Commit 61e4142

Browse files
committed
add null check for ssl before use in wc_DhGenerateKeyPair
1 parent 65f9cdb commit 61e4142

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/internal.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6468,6 +6468,10 @@ int DhGenKeyPair(WOLFSSL* ssl, DhKey* dhKey,
64686468

64696469
WOLFSSL_ENTER("DhGenKeyPair");
64706470

6471+
if (ssl == NULL || dhKey == NULL) {
6472+
return BAD_FUNC_ARG;
6473+
}
6474+
64716475
#ifdef WOLFSSL_ASYNC_CRYPT
64726476
/* initialize event */
64736477
ret = wolfSSL_AsyncInit(ssl, &dhKey->asyncDev, WC_ASYNC_FLAG_NONE);

0 commit comments

Comments
 (0)