Author: pschweitzer
Date: Sun Feb 19 12:42:08 2017
New Revision: 73842
URL:
http://svn.reactos.org/svn/reactos?rev=73842&view=rev
Log:
[DNSAPI]
Properly check for domain name being set
CID 1401070
Modified:
trunk/reactos/dll/win32/dnsapi/dnsapi/query.c
Modified: trunk/reactos/dll/win32/dnsapi/dnsapi/query.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dnsapi/dnsapi/qu…
==============================================================================
--- trunk/reactos/dll/win32/dnsapi/dnsapi/query.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dnsapi/dnsapi/query.c [iso-8859-1] Sun Feb 19 12:42:08 2017
@@ -738,7 +738,7 @@
TempLen += StringLength;
HostWithDomainName = (PCHAR)RtlAllocateHeap(RtlGetProcessHeap(), 0,
TempLen);
StringCchCopyA(HostWithDomainName, TempLen, network_info->HostName);
- if (network_info->DomainName)
+ if (network_info->DomainName[0])
{
StringCchCatA(HostWithDomainName, TempLen, ".");
StringCchCatA(HostWithDomainName, TempLen, network_info->DomainName);
@@ -783,7 +783,7 @@
if ((addr.s_addr != INADDR_ANY) && (addr.s_addr != INADDR_NONE))
adns_addserver(astate, addr);
}
- if (network_info->DomainName)
+ if (network_info->DomainName[0])
{
adns_ccf_search(astate, "LOCALDOMAIN", -1,
network_info->DomainName);
}