Commit fbf4544f authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

iphlpapi: Handle errors from DnsQueryConfig(DnsConfigDnsServerList).

parent d81cf4ed
......@@ -2599,6 +2599,7 @@ static DWORD get_dns_server_list( const NET_LUID *luid, IP_ADDR_STRING *list, IP
for (;;)
{
err = DnsQueryConfig( DnsConfigDnsServerList, 0, NULL, NULL, servers, &array_len );
if (err != ERROR_SUCCESS && err != ERROR_MORE_DATA) goto err;
num = (array_len - FIELD_OFFSET(IP4_ARRAY, AddrArray[0])) / sizeof(IP4_ADDRESS);
needed = num * sizeof(IP_ADDR_STRING);
if (!list || *len < needed)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment