diff options
author | Daniel DeFreez <daniel@defreez.com> | 2019-02-07 09:55:14 -0800 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2019-02-11 08:33:28 +1000 |
commit | a12b338f06442573a04932dbedaad3023113ee25 (patch) | |
tree | d143ba4bf4dc110012545f06f9136fee092f47d2 /crypto/conf/conf_ssl.c | |
parent | 25ca718150cef41e1c1d9c2c8c58e2b1e2cad3fa (diff) |
Fix null pointer dereference in ssl_module_init
CLA: Trivial
Reviewed-by: Paul Yang <yang.yang@baishancloud.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8183)
(cherry picked from commit 758229f7d22775d7547e3b3b886b7f6a289c6897)
Diffstat (limited to 'crypto/conf/conf_ssl.c')
-rw-r--r-- | crypto/conf/conf_ssl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/conf/conf_ssl.c b/crypto/conf/conf_ssl.c index 024bdb4808..8508d2ea0d 100644 --- a/crypto/conf/conf_ssl.c +++ b/crypto/conf/conf_ssl.c @@ -78,6 +78,8 @@ static int ssl_module_init(CONF_IMODULE *md, const CONF *cnf) cnt = sk_CONF_VALUE_num(cmd_lists); ssl_module_free(md); ssl_names = OPENSSL_zalloc(sizeof(*ssl_names) * cnt); + if (ssl_names == NULL) + goto err; ssl_names_count = cnt; for (i = 0; i < ssl_names_count; i++) { struct ssl_conf_name_st *ssl_name = ssl_names + i; |