Index: dll/win32/msafd/misc/dllmain.c =================================================================== --- dll/win32/msafd/misc/dllmain.c (revision 73120) +++ dll/win32/msafd/misc/dllmain.c (working copy) @@ -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,