summaryrefslogtreecommitdiffstats
path: root/crypto/x509v3/v3_cpols.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/x509v3/v3_cpols.c')
-rw-r--r--crypto/x509v3/v3_cpols.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/crypto/x509v3/v3_cpols.c b/crypto/x509v3/v3_cpols.c
index a40f490..ad0506d 100644
--- a/crypto/x509v3/v3_cpols.c
+++ b/crypto/x509v3/v3_cpols.c
@@ -1,5 +1,5 @@
/* v3_cpols.c */
-/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
+/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 1999.
*/
/* ====================================================================
@@ -181,7 +181,11 @@ static STACK_OF(POLICYINFO) *r2i_certpol(X509V3_EXT_METHOD *method,
pol = POLICYINFO_new();
pol->policyid = pobj;
}
- sk_POLICYINFO_push(pols, pol);
+ if (!sk_POLICYINFO_push(pols, pol)){
+ POLICYINFO_free(pol);
+ X509V3err(X509V3_F_R2I_CERTPOL, ERR_R_MALLOC_FAILURE);
+ goto err;
+ }
}
sk_CONF_VALUE_pop_free(vals, X509V3_conf_free);
return pols;
@@ -447,3 +451,4 @@ void X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent)
BIO_printf(out, "%*sNo Qualifiers\n", indent + 2, "");
}
+IMPLEMENT_STACK_OF(X509_POLICY_NODE)
OpenPOWER on IntegriCloud