Skip to content

Commit b69ce5a

Browse files
authored
Merge pull request #9506 from rlm2002/coverity
check if ctx and ssl are null when checking public key in certificate
2 parents 1faf740 + 36e66eb commit b69ce5a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ssl_load.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,6 +1607,9 @@ static int ProcessBufferCertPublicKey(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
16071607
#ifndef NO_RSA
16081608
word32 idx;
16091609
#endif
1610+
if (ctx == NULL && ssl == NULL) {
1611+
return BAD_FUNC_ARG;
1612+
}
16101613

16111614
/* Get key size and check unless not verifying. */
16121615
switch (cert->keyOID) {

0 commit comments

Comments
 (0)