projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
d060749
)
[MSAFD] Don't try to accept on non listening socket. Return WSAEINVAL
author
Peter Hater
<7element@mail.bg>
Thu, 1 Jun 2017 09:41:19 +0000
(09:41 +0000)
committer
Peter Hater
<7element@mail.bg>
Thu, 1 Jun 2017 09:41:19 +0000
(09:41 +0000)
svn path=/trunk/; revision=74728
reactos/dll/win32/msafd/misc/dllmain.c
patch
|
blob
|
history
diff --git
a/reactos/dll/win32/msafd/misc/dllmain.c
b/reactos/dll/win32/msafd/misc/dllmain.c
index
747299e
..
45a1d17
100644
(file)
--- a/
reactos/dll/win32/msafd/misc/dllmain.c
+++ b/
reactos/dll/win32/msafd/misc/dllmain.c
@@
-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)))