From e319a89f84121d17b2bfe944292c3281b809e344 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Tue, 26 Jun 2001 12:04:12 +0000 Subject: [PATCH] Handle empty X509_NAME in printing routines. --- CHANGES | 3 +++ crypto/x509/x509_obj.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/CHANGES b/CHANGES index 748f0f8654..47582d5b4a 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,9 @@ Changes between 0.9.6a and 0.9.6b [XX xxx XXXX] + *) Handle special case when X509_NAME is empty in X509 printing routines. + [Steve Henson] + *) In dsa_do_verify (crypto/dsa/dsa_ossl.c), verify that r and s are positive and less than q. [Bodo Moeller] diff --git a/crypto/x509/x509_obj.c b/crypto/x509/x509_obj.c index 6a3ba8eb15..f0271fdfa1 100644 --- a/crypto/x509/x509_obj.c +++ b/crypto/x509/x509_obj.c @@ -214,6 +214,8 @@ int i; } else p=buf; + if (i == 0) + *p = '\0'; return(p); err: X509err(X509_F_X509_NAME_ONELINE,ERR_R_MALLOC_FAILURE); -- 2.25.1