From 9d566032bbc40d6dfc4537d17a556facfa4d3440 Mon Sep 17 00:00:00 2001 From: Paul Vriens Date: Wed, 28 May 2008 10:05:02 +0200 Subject: [PATCH] ws2_32/tests: Fix crash on win98. --- dlls/ws2_32/tests/sock.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 8aaa72f63f5..8ee5c37d87e 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -1123,6 +1123,10 @@ static void test_WSASocket(void) int ret, err; UINT pi_size; + /* Set pi_size explicitly to a value below 2*sizeof(WSAPROTOCOL_INFOA) + * to avoid a crash on win98. + */ + pi_size = 0; ret = WSAEnumProtocolsA(providers, NULL, &pi_size); ok(ret == SOCKET_ERROR, "WSAEnumProtocolsA({6,0}, NULL, 0) returned %d\n", ret);