mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 19:26:33 +00:00
[MSAFD] Don't try to accept on non listening socket. Return WSAEINVAL
svn path=/trunk/; revision=74728
This commit is contained in:
@@ -1464,6 +1464,11 @@ WSPAccept(SOCKET Handle,
|
||||
if (lpErrno) *lpErrno = WSAENOTSOCK;
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
if (!Socket->SharedData->Listening)
|
||||
{
|
||||
if (lpErrno) *lpErrno = WSAEINVAL;
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
if ((SocketAddress && !SocketAddressLength) ||
|
||||
(SocketAddressLength && !SocketAddress) ||
|
||||
(SocketAddressLength && *SocketAddressLength < sizeof(SOCKADDR)))
|
||||
|
||||
Reference in New Issue
Block a user