24 Sep
2020
24 Sep
'20
10:21 p.m.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> --- dlls/ws2_32/socket.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 1ac1f77d6e6..5089029f4b4 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -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; -- 2.28.0