From: Dr. Stephen Henson Date: Tue, 10 Nov 2009 01:00:37 +0000 (+0000) Subject: PR: 2091 X-Git-Tag: OpenSSL_0_9_8m-beta1~58 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7e42945918dc45c3538cea020ef0937543f8636c;p=oweals%2Fopenssl.git PR: 2091 Submitted by: Martin Kaiser , Stephen Henson Approved by: steve@openssl.org If an OID has no short name or long name return the numerical representation. --- diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c index 7fd7433241..760af16dd9 100644 --- a/crypto/objects/obj_dat.c +++ b/crypto/objects/obj_dat.c @@ -456,10 +456,13 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) s=OBJ_nid2ln(nid); if (s == NULL) s=OBJ_nid2sn(nid); - if (buf) - BUF_strlcpy(buf,s,buf_len); - n=strlen(s); - return n; + if (s) + { + if (buf) + BUF_strlcpy(buf,s,buf_len); + n=strlen(s); + return n; + } }