From c8633008059c82c6cdffaed047210fd512cad92b Mon Sep 17 00:00:00 2001 From: David Garske Date: Tue, 8 Mar 2016 09:34:56 -0800 Subject: [PATCH] Fixed scan-build error with possibly using a NULL pointer. --- src/ssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ssl.c b/src/ssl.c index 645f4880e..9080ec51f 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -10063,7 +10063,7 @@ WOLFSSL_X509* wolfSSL_X509_load_certificate_file(const char* fname, int format) /* At this point we want `der` to have the certificate in DER format */ /* ready to be decoded. */ - if (der->buffer != NULL) { + if (der != NULL && der->buffer != NULL) { #ifdef WOLFSSL_SMALL_STACK DecodedCert* cert = NULL; #else