From: Dr. Stephen Henson Date: Tue, 26 Jun 2001 12:04:12 +0000 (+0000) Subject: Handle empty X509_NAME in printing routines. X-Git-Tag: OpenSSL_0_9_6b~5 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e319a89f84121d17b2bfe944292c3281b809e344;p=oweals%2Fopenssl.git Handle empty X509_NAME in printing routines. --- 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);