Commit 320286af authored by Alexandre Julliard's avatar Alexandre Julliard

iphlpapi/tests: Don't pass a NULL size to GetTcp/UdpTable, it crashes on Vista.

parent e8f9a6fc
......@@ -424,15 +424,11 @@ static void testGetTcpTable(void)
DWORD apiReturn;
ULONG dwSize = 0;
apiReturn = gGetTcpTable(NULL, NULL, FALSE);
apiReturn = gGetTcpTable(NULL, &dwSize, FALSE);
if (apiReturn == ERROR_NOT_SUPPORTED) {
skip("GetTcpTable is not supported\n");
return;
}
ok(apiReturn == ERROR_INVALID_PARAMETER,
"GetTcpTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n",
apiReturn);
apiReturn = gGetTcpTable(NULL, &dwSize, FALSE);
ok(apiReturn == ERROR_INSUFFICIENT_BUFFER ||
broken(apiReturn == ERROR_NO_DATA), /* win95 */
"GetTcpTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n",
......@@ -455,15 +451,11 @@ static void testGetUdpTable(void)
DWORD apiReturn;
ULONG dwSize = 0;
apiReturn = gGetUdpTable(NULL, NULL, FALSE);
apiReturn = gGetUdpTable(NULL, &dwSize, FALSE);
if (apiReturn == ERROR_NOT_SUPPORTED) {
skip("GetUdpTable is not supported\n");
return;
}
ok(apiReturn == ERROR_INVALID_PARAMETER,
"GetUdpTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n",
apiReturn);
apiReturn = gGetUdpTable(NULL, &dwSize, FALSE);
ok(apiReturn == ERROR_INSUFFICIENT_BUFFER,
"GetUdpTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n",
apiReturn);
......
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