Andrew Nguyen : iphlpapi: Correctly compute the buffer offset for the DNS address structure in GetAdaptersAddresses .
Alexandre Julliard
julliard at winehq.org
Mon Jan 17 10:59:48 CST 2011
Module: wine
Branch: master
Commit: 587a9aa9f01abaf40a17a538df823ebdf79025d7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=587a9aa9f01abaf40a17a538df823ebdf79025d7
Author: Andrew Nguyen <anguyen at codeweavers.com>
Date: Sat Jan 15 02:28:02 2011 -0600
iphlpapi: Correctly compute the buffer offset for the DNS address structure in GetAdaptersAddresses.
Spotted with Valgrind.
---
dlls/iphlpapi/iphlpapi_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c
index 3995a17..2966640 100644
--- a/dlls/iphlpapi/iphlpapi_main.c
+++ b/dlls/iphlpapi/iphlpapi_main.c
@@ -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)
{
More information about the wine-cvs
mailing list