]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/x509/t_x509.c
Fix a read buffer overrun in X509_aux_print().
[thirdparty/openssl.git] / crypto / x509 / t_x509.c
index 69b04e74ebffe8a3af79a93c8377dbf94d520218..95ee5f519fdddca24672cc2c36f8c77d7ea8f3c5 100644 (file)
@@ -380,9 +380,9 @@ int X509_aux_print(BIO *out, X509 *x, int indent)
         BIO_puts(out, "\n");
     } else
         BIO_printf(out, "%*sNo Rejected Uses.\n", indent, "");
-    alias = X509_alias_get0(x, NULL);
+    alias = X509_alias_get0(x, &i);
     if (alias)
-        BIO_printf(out, "%*sAlias: %s\n", indent, "", alias);
+        BIO_printf(out, "%*sAlias: %.*s\n", indent, "", i, alias);
     keyid = X509_keyid_get0(x, &keyidlen);
     if (keyid) {
         BIO_printf(out, "%*sKey Id: ", indent, "");