From 385646584819f2102a664c9c717748dcee4147b0 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Sat, 7 Nov 2015 11:54:17 +0000 Subject: [PATCH] [WS2_32] - Fill the protocol info buffer in WSAEnumProtocolsA/W. Should fix some ws2_32_winetest:sock crashes and flakiness. svn path=/trunk/; revision=69829 --- reactos/dll/win32/ws2_32/misc/stubs.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/reactos/dll/win32/ws2_32/misc/stubs.c b/reactos/dll/win32/ws2_32/misc/stubs.c index 2ce641cf000..98e13464639 100644 --- a/reactos/dll/win32/ws2_32/misc/stubs.c +++ b/reactos/dll/win32/ws2_32/misc/stubs.c @@ -497,6 +497,11 @@ WSAEnumProtocolsA(IN LPINT lpiProtocols, { UNIMPLEMENTED + if (lpProtocolBuffer) + { + RtlZeroMemory(lpProtocolBuffer, *lpdwBufferLength); + } + *lpdwBufferLength = sizeof(WSAPROTOCOL_INFOA); WSASetLastError(WSASYSCALLFAILURE); return SOCKET_ERROR; } @@ -513,6 +518,11 @@ WSAEnumProtocolsW(IN LPINT lpiProtocols, { UNIMPLEMENTED + if (lpProtocolBuffer) + { + RtlZeroMemory(lpProtocolBuffer, *lpdwBufferLength); + } + *lpdwBufferLength = sizeof(WSAPROTOCOL_INFOW); WSASetLastError(WSASYSCALLFAILURE); return SOCKET_ERROR; } -- 2.17.1