diff options
author | Matt Caswell <matt@openssl.org> | 2014-12-04 10:18:40 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2014-12-12 23:50:24 +0000 |
commit | c6a84ff3516d8ecd92d866b6f0ae0d63df6d9c53 (patch) | |
tree | 53baca56ca9ecd08ec8b3bc938e0c1a900ffdf3c /crypto/x509 | |
parent | b8b9bcb4587f6df315223ae18ec10ecdb5a9dab8 (diff) |
Fix use of NULL memory pointer in X509_VERIFY_PARAM_new in the event of a
malloc failure.
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'crypto/x509')
-rw-r--r-- | crypto/x509/x509_vpm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/x509/x509_vpm.c b/crypto/x509/x509_vpm.c index dfd89d89fa..ba546bd1fa 100644 --- a/crypto/x509/x509_vpm.c +++ b/crypto/x509/x509_vpm.c @@ -89,6 +89,8 @@ X509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void) { X509_VERIFY_PARAM *param; param = OPENSSL_malloc(sizeof(X509_VERIFY_PARAM)); + if (!param) + return NULL; memset(param, 0, sizeof(X509_VERIFY_PARAM)); x509_verify_param_zero(param); return param; |