From 1954ef164a55cbc4369f513cca3fb43f3550d81a Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 8 Mar 2021 11:54:33 -0500 Subject: Minor OpenSSL fixes These are all the NULL pointer dereferences (which all appear to be, at worst, very difficult to hit) that gcc -fanalyzer finds in our OpenSSL code. Signed-off-by: Peter Jones --- Cryptlib/OpenSSL/crypto/asn1/asn_mime.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Cryptlib/OpenSSL/crypto/asn1/asn_mime.c') diff --git a/Cryptlib/OpenSSL/crypto/asn1/asn_mime.c b/Cryptlib/OpenSSL/crypto/asn1/asn_mime.c index 5170906c..017be9d9 100644 --- a/Cryptlib/OpenSSL/crypto/asn1/asn_mime.c +++ b/Cryptlib/OpenSSL/crypto/asn1/asn_mime.c @@ -843,6 +843,10 @@ static int mime_hdr_addparam(MIME_HEADER *mhdr, char *name, char *value) char *tmpname, *tmpval, *p; int c; MIME_PARAM *mparam; + + if (!mhdr) + return 0; + if (name) { tmpname = BUF_strdup(name); if (!tmpname) -- cgit v1.2.3