diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-03-14 12:39:05 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-03-14 12:39:05 +0000 |
commit | e39acc1c90f5a41916d857ace42c7b9a47f8e7a6 (patch) | |
tree | 9f1adec113ceb29be4a9c3968d2eec398b7a65e8 /crypto/x509v3 | |
parent | a0b76569b2a6f205e071b3983d9e6630c1bcd652 (diff) |
PR: 1864
Submitted by: Ger Hobbelt <ger@hobbelt.com>
Reviewed by: steve@openssl.org
Check return value.
Diffstat (limited to 'crypto/x509v3')
-rw-r--r-- | crypto/x509v3/v3_cpols.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crypto/x509v3/v3_cpols.c b/crypto/x509v3/v3_cpols.c index 7573fec9b1..b452ac4e53 100644 --- a/crypto/x509v3/v3_cpols.c +++ b/crypto/x509v3/v3_cpols.c @@ -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,6 @@ 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) + |