ws2_32: Always return WSAEINVAL if AF_UNSPEC is used with a zero protocol.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
088b7c5814
commit
2a573c6f48
|
@ -7648,7 +7648,13 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
|
|||
protocol = lpProtocolInfo->iProtocol;
|
||||
}
|
||||
|
||||
if (!type && (af || protocol))
|
||||
if (!af && !protocol)
|
||||
{
|
||||
WSASetLastError(WSAEINVAL);
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
|
||||
if (!type)
|
||||
{
|
||||
int autoproto = protocol;
|
||||
WSAPROTOCOL_INFOW infow;
|
||||
|
|
Loading…
Reference in New Issue