]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix segfault when no --config argument is given
authorArne Schwabe <arne@rfc2549.org>
Fri, 22 Jul 2022 13:46:52 +0000 (15:46 +0200)
committerGert Doering <gert@greenie.muc.de>
Fri, 22 Jul 2022 14:06:42 +0000 (16:06 +0200)
Commit 4df5003 introduced a check against options->config but
did not ensure that this variable is non-null.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
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 <gert@greenie.muc.de>
src/openvpn/options.c

index d2ffab51e0f00474fdfb7a25e72f4af5865375cd..2a223bded4bf70a978f4e05799ea36a828d33604 100644 (file)
@@ -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.");