Skip to content

Commit fc858ec

Browse files
authored
Merge pull request #6908 from JacobBarthelmeh/static-analysis
minor warning fixes from static analysis tests
2 parents d801dc1 + 6538ed1 commit fc858ec

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/ocsp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,8 +859,8 @@ int wolfSSL_OCSP_basic_verify(WOLFSSL_OCSP_BASICRESP *bs,
859859
WOLFSSL_X509* x = wolfSSL_sk_X509_value(certs, idx);
860860
int derSz = 0;
861861
const byte* der = wolfSSL_X509_get_der(x, &derSz);
862-
863-
if (derSz == (int)bs->certSz && XMEMCMP(bs->cert, der, derSz) == 0) {
862+
if (der != NULL && derSz == (int)bs->certSz &&
863+
XMEMCMP(bs->cert, der, derSz) == 0) {
864864
ret = WOLFSSL_SUCCESS;
865865
goto out;
866866
}

src/ssl.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8715,9 +8715,10 @@ int wolfSSL_SetCRL_Cb(WOLFSSL* ssl, CbMissingCRL cb)
87158715
int wolfSSL_SetCRL_IOCb(WOLFSSL* ssl, CbCrlIO cb)
87168716
{
87178717
WOLFSSL_ENTER("wolfSSL_SetCRL_Cb");
8718-
SSL_CM_WARNING(ssl);
8719-
if (ssl)
8718+
if (ssl) {
8719+
SSL_CM_WARNING(ssl);
87208720
return wolfSSL_CertManagerSetCRL_IOCb(SSL_CM(ssl), cb);
8721+
}
87218722
else
87228723
return BAD_FUNC_ARG;
87238724
}

0 commit comments

Comments
 (0)