Commit 708ab4ca authored by Bruno Jesus's avatar Bruno Jesus Committed by Alexandre Julliard

iphlpapi: Update the buffer size only if required in GetAdaptersAddresses.

parent a49668e8
......@@ -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;
}
TRACE("num adapters %u\n", table->numIndexes);
HeapFree(GetProcessHeap(), 0, table);
......
......@@ -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)
......
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