| Message ID | 20251123120029.19736-1-gert@greenie.muc.de |
|---|---|
| State | New |
| Headers | show |
| Series | [Openvpn-devel,v1] iservice: check for NULL pointer | expand |
Trivial enough. Stared-at-code, and buildbot did the compile tests.
I don't think this can ever happen in our context - search_domains
comes from a single call chain, and is initialized here
PWSTR wide_search_domains;
wide_search_domains = utf8to16(search_domains);
if (!wide_search_domains)
{
return ERROR_OUTOFMEMORY;
}
SetNrptExcludeRules(nrpt_key, ovpn_pid, wide_search_domains);
free(wide_search_domains);
.. but this change does not hurt, and "if (NULL) return FALSE" matches
the function description "is 'domain' in 'list'? FALSE = no" just fine.
Your patch has been applied to the master branch.
commit 2e2ac94e9cf3d0bdb28339594c8236fa98784967
Author: Heiko Hund
Date: Sun Nov 23 13:00:23 2025 +0100
iservice: check for NULL pointer
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>
--
kind regards,
Gert Doering
diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index ec80a30..006f748 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -2106,7 +2106,7 @@ ListContainsDomain(PCWSTR list, PCWSTR domain, size_t len) { PCWSTR match = list; - while (TRUE) + while (match) { match = wcsstr(match, domain); if (!match)