]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
iservice: check for NULL pointer
authorHeiko Hund <heiko@ist.eigentlich.net>
Sun, 23 Nov 2025 12:00:23 +0000 (13:00 +0100)
committerGert Doering <gert@greenie.muc.de>
Sun, 23 Nov 2025 13:29:01 +0000 (14:29 +0100)
Check if the list argument to ListContainsDomain() is NULL. Otherwise
the call to wcsstr() will bail out.

Reported-by: Marc Heuse <marc@srlabs.de>
Reported-by: stephan@srlabs.de
Change-Id: Icd7c7b08e317aefd91a60bfc62e92cd8707b6fac
Signed-off-by: Heiko Hund <heiko@ist.eigentlich.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
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 <gert@greenie.muc.de>
src/openvpnserv/interactive.c

index 860375d17d30cbe1c52a069f60282719b6534dd0..07ca7c942e3375ace4f26392b036d8ddbbf4310c 100644 (file)
@@ -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)