From: Matt Caswell Date: Thu, 4 Dec 2014 10:18:40 +0000 (+0000) Subject: Fix use of NULL memory pointer in X509_VERIFY_PARAM_new in the event of a X-Git-Tag: OpenSSL_1_0_1k~55 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c6a84ff3516d8ecd92d866b6f0ae0d63df6d9c53;p=oweals%2Fopenssl.git Fix use of NULL memory pointer in X509_VERIFY_PARAM_new in the event of a malloc failure. Reviewed-by: Kurt Roeckx --- 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;