Author: phater
Date: Fri Nov 4 18:03:15 2016
New Revision: 73123
URL:
http://svn.reactos.org/svn/reactos?rev=73123&view=rev
Log:
[MSAFD] Check params on WSAAceept. CORE-12104
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] Fri Nov 4 18:03:15 2016
@@ -1351,6 +1351,13 @@
if (lpErrno) *lpErrno = WSAENOTSOCK;
return SOCKET_ERROR;
}
+ if ((SocketAddress && !SocketAddressLength) ||
+ (SocketAddressLength && !SocketAddress) ||
+ (SocketAddressLength && *SocketAddressLength < sizeof(SOCKADDR)))
+ {
+ if (lpErrno) *lpErrno = WSAEFAULT;
+ return INVALID_SOCKET;
+ }
Status = NtCreateEvent(&SockEvent,
EVENT_ALL_ACCESS,