diff options
author | Ben Laurie <ben@openssl.org> | 1999-04-17 21:25:43 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 1999-04-17 21:25:43 +0000 |
commit | e778802f53c8d47e96a6e4cbc776eb6e1d4c461a (patch) | |
tree | 719d4dd0fc69b355c6d8329af1f90b2c4f603548 /crypto/x509/x509_obj.c | |
parent | d77b3054cd87c2b13fa0169931f74b8e0dac5252 (diff) | |
download | openssl-e778802f53c8d47e96a6e4cbc776eb6e1d4c461a.tar.gz |
Massive constification.
Diffstat (limited to 'crypto/x509/x509_obj.c')
-rw-r--r-- | crypto/x509/x509_obj.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/crypto/x509/x509_obj.c b/crypto/x509/x509_obj.c index c0576fd6f6..5a16fd500a 100644 --- a/crypto/x509/x509_obj.c +++ b/crypto/x509/x509_obj.c @@ -71,14 +71,14 @@ int len; X509_NAME_ENTRY *ne; unsigned int i; int n,lold,l,l1,l2,num,j,type; - char *s,*p; + const char *s; + char *p; unsigned char *q; BUF_MEM *b=NULL; static char hex[17]="0123456789ABCDEF"; int gs_doit[4]; char tmp_buf[80]; - if (a == NULL) return("NO X509_NAME"); if (buf == NULL) { if ((b=BUF_MEM_new()) == NULL) goto err; @@ -86,6 +86,16 @@ int len; b->data[0]='\0'; len=200; } + if (a == NULL) + { + if(b) + { + buf=b->data; + Free(b); + } + strncpy(buf,"NO X509_NAME",len); + return buf; + } len--; /* space for '\0' */ l=0; @@ -166,7 +176,7 @@ int len; if (b != NULL) { p=b->data; - Free((char *)b); + Free(b); } else p=buf; |