From 2e2ac94e9cf3d0bdb28339594c8236fa98784967 Mon Sep 17 00:00:00 2001 From: Heiko Hund Date: Sun, 23 Nov 2025 13:00:23 +0100 Subject: [PATCH] iservice: check for NULL pointer Check if the list argument to ListContainsDomain() is NULL. Otherwise the call to wcsstr() will bail out. Reported-by: Marc Heuse Reported-by: stephan@srlabs.de Change-Id: Icd7c7b08e317aefd91a60bfc62e92cd8707b6fac Signed-off-by: Heiko Hund Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1393 Message-Id: <20251123120029.19736-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34611.html Signed-off-by: Gert Doering --- src/openvpnserv/interactive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index 860375d1..07ca7c94 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -2106,7 +2106,7 @@ static BOOL ListContainsDomain(PCWSTR list, PCWSTR domain, size_t len) { PCWSTR match = list; - while (TRUE) + while (match) { match = wcsstr(match, domain); if (!match) -- 2.43.0