- Fill the protocol info buffer in WSAEnumProtocolsA/W. Should fix some ws2_32_winetest:sock crashes and flakiness.

svn path=/trunk/; revision=69829
This commit is contained in:
Thomas Faber 2015-11-07 11:54:17 +00:00
parent b739050085
commit 3856465848

View file

@ -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;
}