summaryrefslogtreecommitdiffstats
path: root/crypto/x509/x509_obj.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/x509/x509_obj.c')
-rw-r--r--crypto/x509/x509_obj.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/x509/x509_obj.c b/crypto/x509/x509_obj.c
index ac871b4029..920828373c 100644
--- a/crypto/x509/x509_obj.c
+++ b/crypto/x509/x509_obj.c
@@ -86,6 +86,8 @@ char *X509_NAME_oneline(X509_NAME *a, char *buf, int len)
goto err;
b->data[0] = '\0';
len = 200;
+ } else if (len == 0) {
+ return NULL;
}
if (a == NULL) {
if (b) {