GetItfDnsDomains expects a non-zero size buffer to return the domains
in. Check for the size as well, not just for a valid pointer.
Change-Id: I8b26c65415f5a751f416d80a22cbb7ff14aa27c0
Reported-by: Marc Heuse <marc@srlabs.de>
Reported-by: stephan@srlabs.de
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/+/1389
Message-Id: <
20251123113747.17739-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34606.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
static LSTATUS
GetItfDnsDomains(HKEY itf, PCWSTR search_domains, PWSTR domains, PDWORD size)
{
- if (domains == NULL || size == 0)
+ if (domains == NULL || size == NULL || *size == 0)
{
return ERROR_INVALID_PARAMETER;
}