From 4ecf3545d7b720d97bb673317e767374d67e29c5 Mon Sep 17 00:00:00 2001 From: David Garske Date: Fri, 22 Apr 2022 16:07:24 -0700 Subject: [PATCH] Improve scan-build fix for `ProcessPeerCertParse` checking of empty `dCert`. With `WOLFSSL_SMALL_CERT_VERIFY` it is NULL. --- src/internal.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/internal.c b/src/internal.c index 92a9de033..8005c2699 100644 --- a/src/internal.c +++ b/src/internal.c @@ -11700,8 +11700,13 @@ static int ProcessPeerCertParse(WOLFSSL* ssl, ProcPeerCertArgs* args, int sigRet = 0; #endif - if (ssl == NULL || args == NULL || args->dCert == NULL) + if (ssl == NULL || args == NULL + #ifndef WOLFSSL_SMALL_CERT_VERIFY + || args->dCert == NULL + #endif + ) { return BAD_FUNC_ARG; + } /* check to make sure certificate index is valid */ if (args->certIdx > args->count)