summaryrefslogtreecommitdiff
path: root/Cryptlib/OpenSSL/crypto/asn1
diff options
context:
space:
mode:
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/asn1')
-rw-r--r--Cryptlib/OpenSSL/crypto/asn1/asn_mime.c4
-rw-r--r--Cryptlib/OpenSSL/crypto/asn1/t_req.c5
2 files changed, 7 insertions, 2 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)
diff --git a/Cryptlib/OpenSSL/crypto/asn1/t_req.c b/Cryptlib/OpenSSL/crypto/asn1/t_req.c
index 70aba4cc..c32241c2 100644
--- a/Cryptlib/OpenSSL/crypto/asn1/t_req.c
+++ b/Cryptlib/OpenSSL/crypto/asn1/t_req.c
@@ -195,10 +195,11 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags,
goto err;
if (BIO_puts(bp, ":") <= 0)
goto err;
- if ((type == V_ASN1_PRINTABLESTRING) ||
+ if (bs != NULL && (
+ (type == V_ASN1_PRINTABLESTRING) ||
(type == V_ASN1_UTF8STRING) ||
(type == V_ASN1_T61STRING) ||
- (type == V_ASN1_IA5STRING)) {
+ (type == V_ASN1_IA5STRING))) {
if (BIO_write(bp, (char *)bs->data, bs->length)
!= bs->length)
goto err;