Author: phater
Date: Thu Jun 1 09:41:19 2017
New Revision: 74728
URL:
http://svn.reactos.org/svn/reactos?rev=74728&view=rev
Log:
[MSAFD] Don't try to accept on non listening socket. Return WSAEINVAL
Modified:
trunk/reactos/dll/win32/msafd/misc/dllmain.c
Modified: trunk/reactos/dll/win32/msafd/misc/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/misc/dllma…
==============================================================================
--- trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] Thu Jun 1 09:41:19 2017
@@ -1464,6 +1464,11 @@
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)))