Make sha-256/-512 naming in speed.c consistent with their names as they
[openssl.git] / crypto / x509 / x509_obj.c
index 691b71f03158345539a6e0da95784d1770e80d7a..1e718f76eb2dd0b37582e22110f7b002db2512d9 100644 (file)
@@ -91,9 +91,10 @@ int i;
            if(b)
                {
                buf=b->data;
-               Free(b);
+               OPENSSL_free(b);
                }
            strncpy(buf,"NO X509_NAME",len);
+           buf[len-1]='\0';
            return buf;
            }
 
@@ -210,10 +211,12 @@ int i;
        if (b != NULL)
                {
                p=b->data;
-               Free(b);
+               OPENSSL_free(b);
                }
        else
                p=buf;
+       if (i == 0)
+               *p = '\0';
        return(p);
 err:
        X509err(X509_F_X509_NAME_ONELINE,ERR_R_MALLOC_FAILURE);