src/ssl_load.c: in ProcessBufferCert(), check ctx for nullness before accessing ctx->verifyNone (fixes -Wnull-dereference reported by multi-test dtls-no-rsa-no-dh after merge of 36e66eb763).

This commit is contained in:
Daniel Pouzzner
2025-12-16 16:56:55 -06:00
parent b42e9a9410
commit cd3e81a656

View File

@@ -2064,7 +2064,7 @@ static int ProcessBufferCert(WOLFSSL_CTX* ctx, WOLFSSL* ssl, DerBuffer* der)
}
/* Don't check if no SSL object verification is disabled for SSL
* context. */
else if ((ssl == NULL) && ctx->verifyNone) {
else if ((ssl == NULL) && (ctx != NULL) && ctx->verifyNone) {
checkKeySz = 0;
}