From: Frank Lichtenheld Date: Mon, 2 Jun 2025 15:21:08 +0000 (+0200) Subject: Do not segfault on missing --dh in server config X-Git-Tag: v2.7_alpha2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92b9cb5e0363a1c19b76a5a6e5f36c9891406590;p=thirdparty%2Fopenvpn.git Do not segfault on missing --dh in server config Change-Id: I0e13595c1057c680e1065eae84ca94b273ed9ca1 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Message-Id: <20250602152115.27130-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg31844.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 0d648ba02..b9708343b 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -3698,7 +3698,7 @@ options_postprocess_mutate(struct options *o, struct env_set *es) if (o->tls_server) { - if (streq(o->dh_file, "none")) + if (o->dh_file && streq(o->dh_file, "none")) { o->dh_file = NULL; }