File CVE-2021-3712-Fix-read-buffer-overrun-in-X509_CERT_AUX_print.patch of Package openssl-1_0_0.21013

Index: openssl-1.0.2p/crypto/asn1/t_x509a.c
===================================================================
--- openssl-1.0.2p.orig/crypto/asn1/t_x509a.c
+++ openssl-1.0.2p/crypto/asn1/t_x509a.c
@@ -104,7 +104,7 @@ int X509_CERT_AUX_print(BIO *out, X509_C
     } else
         BIO_printf(out, "%*sNo Rejected Uses.\n", indent, "");
     if (aux->alias)
-        BIO_printf(out, "%*sAlias: %s\n", indent, "", aux->alias->data);
+        BIO_printf(out, "%*sAlias: %.*s\n", indent, "", aux->alias->length, aux->alias->data);
     if (aux->keyid) {
         BIO_printf(out, "%*sKey Id: ", indent, "");
         for (i = 0; i < aux->keyid->length; i++)
openSUSE Build Service is sponsored by