summaryrefslogtreecommitdiff
path: root/Cryptlib/OpenSSL/crypto/asn1/asn_mime.c
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2021-03-08 11:54:33 -0500
committerJan Setje-Eilers <73182357+jsetje@users.noreply.github.com>2021-03-09 13:52:53 -0800
commit1954ef164a55cbc4369f513cca3fb43f3550d81a (patch)
tree124965e9d3355c9438d645fa0f1e881fe554fedf /Cryptlib/OpenSSL/crypto/asn1/asn_mime.c
parentdddeaf3f7dc8d30640119e999bbfabf4ce068a68 (diff)
downloadefi-boot-shim-1954ef164a55cbc4369f513cca3fb43f3550d81a.tar.gz
efi-boot-shim-1954ef164a55cbc4369f513cca3fb43f3550d81a.zip
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 <pjones@redhat.com>
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/asn1/asn_mime.c')
-rw-r--r--Cryptlib/OpenSSL/crypto/asn1/asn_mime.c4
1 files changed, 4 insertions, 0 deletions
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)