From: Richard Levitte Date: Wed, 21 May 2003 14:44:59 +0000 (+0000) Subject: String not properly NUL-terminated when no X509_NAME is given. X-Git-Tag: OpenSSL_0_9_6k~29 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fd37856472a560daf2cb976d3639f8cd0f513244;p=oweals%2Fopenssl.git String not properly NUL-terminated when no X509_NAME is given. PR: 618 --- diff --git a/crypto/x509/x509_obj.c b/crypto/x509/x509_obj.c index f0271fdfa1..1e718f76eb 100644 --- a/crypto/x509/x509_obj.c +++ b/crypto/x509/x509_obj.c @@ -94,6 +94,7 @@ int i; OPENSSL_free(b); } strncpy(buf,"NO X509_NAME",len); + buf[len-1]='\0'; return buf; }