From: Arne Schwabe Date: Fri, 22 Jul 2022 13:46:52 +0000 (+0200) Subject: Fix segfault when no --config argument is given X-Git-Tag: v2.6_beta1~156 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a0fcced7c44ae03a15e2ee28cd1867171c2c988;p=thirdparty%2Fopenvpn.git Fix segfault when no --config argument is given Commit 4df5003 introduced a check against options->config but did not ensure that this variable is non-null. Signed-off-by: Arne Schwabe Acked-by: Gert Doering Message-Id: <20220722134652.2446598-1-arne@rfc2549.org> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24722.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/options.c b/src/openvpn/options.c index d2ffab51e..2a223bded 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -3662,7 +3662,7 @@ options_postprocess_mutate(struct options *o, struct env_set *es) o->verify_hash_no_ca = true; } - if (streq(o->config, "stdin") && o->remap_sigusr1 == SIGHUP) + if (o->config && streq(o->config, "stdin") && o->remap_sigusr1 == SIGHUP) { msg(M_USAGE, "Options 'config stdin' and 'remap-usr1 SIGHUP' are " "incompatible with each other.");