diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index d2f36feeaaa..513cbcea005 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -1382,8 +1382,10 @@ ULONG WINAPI DECLSPEC_HOTPATCH GetAdaptersAddresses(ULONG family, ULONG flags, P ret = ERROR_SUCCESS; } else + { ret = ERROR_BUFFER_OVERFLOW; - *buflen = total_size; + *buflen = total_size; + } TRACE("num adapters %u\n", table->numIndexes); HeapFree(GetProcessHeap(), 0, table); diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c index 5160063c809..377aadf71a8 100644 --- a/dlls/iphlpapi/tests/iphlpapi.c +++ b/dlls/iphlpapi/tests/iphlpapi.c @@ -1338,7 +1338,6 @@ static void test_GetAdaptersAddresses(void) ptr = HeapAlloc(GetProcessHeap(), 0, osize); ret = pGetAdaptersAddresses(AF_UNSPEC, 0, NULL, ptr, &osize); ok(!ret, "expected ERROR_SUCCESS got %u\n", ret); -todo_wine ok(osize == size, "expected %d, got %d\n", size, osize); for (aa = ptr; !ret && aa; aa = aa->Next)