diff options
author | Simon L. B. Nielsen <simon@FreeBSD.org> | 2010-02-28 18:49:43 +0000 |
---|---|---|
committer | Simon L. B. Nielsen <simon@FreeBSD.org> | 2010-02-28 18:49:43 +0000 |
commit | f7a1b4761cf3f798e1b42d703d38221b47ce1eec (patch) | |
tree | 21770f10e7f26d05fc9b0fa96a7b6d7b107552c5 /crypto/objects/obj_dat.c | |
parent | f0c2a617dfb432d01bc5a716eb18dae12e6b45e3 (diff) |
Notes
Diffstat (limited to 'crypto/objects/obj_dat.c')
-rw-r--r-- | crypto/objects/obj_dat.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c index 7fd74332417b..760af16dd9a7 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; + } } |