Commit 587a9aa9 authored by Andrew Nguyen's avatar Andrew Nguyen Committed by Alexandre Julliard

iphlpapi: Correctly compute the buffer offset for the DNS address structure in…

iphlpapi: Correctly compute the buffer offset for the DNS address structure in GetAdaptersAddresses. Spotted with Valgrind.
parent 037d58c4
......@@ -1100,7 +1100,7 @@ ULONG WINAPI GetAdaptersAddresses(ULONG family, ULONG flags, PVOID reserved,
}
if (!(flags & GAA_FLAG_SKIP_DNS_SERVER))
{
firstDns = (PIP_ADAPTER_DNS_SERVER_ADDRESS)((BYTE *)aa + total_size - dns_server_size - dns_suffix_size);
firstDns = (PIP_ADAPTER_DNS_SERVER_ADDRESS)((BYTE *)first_aa + total_size - dns_server_size - dns_suffix_size);
get_dns_server_addresses(firstDns, &dns_server_size);
for (aa = first_aa; aa; aa = aa->Next)
{
......
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