diff options
author | Vladislav Grishenko <themiron@mail.ru> | 2018-02-27 19:16:09 +0500 |
---|---|---|
committer | Vladislav Grishenko <themiron@mail.ru> | 2018-02-27 19:16:09 +0500 |
commit | 65d874361c6a054bc99c3d4e94310e64feec504e (patch) | |
tree | 7ccbd8829be0d18c97cf2df2a0b45202ae374636 /accel-pppd/ctrl/sstp | |
parent | 6f93514317953994a24e9087d44e7039e0401922 (diff) | |
download | accel-ppp-65d874361c6a054bc99c3d4e94310e64feec504e.tar.gz accel-ppp-65d874361c6a054bc99c3d4e94310e64feec504e.zip |
sstp: fix crash with no any accept option specified
Diffstat (limited to 'accel-pppd/ctrl/sstp')
-rw-r--r-- | accel-pppd/ctrl/sstp/sstp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/accel-pppd/ctrl/sstp/sstp.c b/accel-pppd/ctrl/sstp/sstp.c index b16fcaa..71accc3 100644 --- a/accel-pppd/ctrl/sstp/sstp.c +++ b/accel-pppd/ctrl/sstp/sstp.c @@ -2206,7 +2206,7 @@ static void ssl_load_config(struct sstp_serv_t *serv, const char *servername) } opt = conf_get_opt("sstp", "accept"); - if (strhas(opt, "ssl", ',')) { + if (opt && strhas(opt, "ssl", ',')) { legacy_ssl: ssl_ctx = SSL_CTX_new(SSLv23_server_method()); if (!ssl_ctx) { @@ -2307,7 +2307,7 @@ static void load_config(void) } opt = conf_get_opt("sstp", "accept"); - conf_proxyproto = strhas(opt, "proxy", ','); + conf_proxyproto = opt && strhas(opt, "proxy", ','); #ifdef CRYPTO_OPENSSL ssl_load_config(&serv, conf_hostname); |