Improve scan-build fix for ProcessPeerCertParse checking of empty dCert. With WOLFSSL_SMALL_CERT_VERIFY it is NULL.

This commit is contained in:
David Garske
2022-04-22 16:07:24 -07:00
parent e9b80e53fa
commit 4ecf3545d7

View File

@ -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)