Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ws2_32/socket.c | 12 ------------ server/sock.c | 6 ++++++ 2 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 845a0e68986..1a484da1527 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -2014,22 +2014,10 @@ static BOOL WINAPI WS2_ConnectEx( SOCKET s, const struct WS_sockaddr *name, int struct afd_connect_params *params; void *cvalue = NULL; NTSTATUS status; - int fd, ret;
TRACE( "socket %#lx, ptr %p %s, length %d, send_buffer %p, send_len %u, overlapped %p\n", s, name, debugstr_sockaddr(name), namelen, send_buffer, send_len, overlapped );
- if ((fd = get_sock_fd( s, FILE_READ_DATA, NULL )) == -1) - return FALSE; - - if ((ret = is_fd_bound( fd, NULL, NULL )) <= 0) - { - SetLastError( ret ? wsaErrno() : WSAEINVAL ); - release_sock_fd( s, fd ); - return FALSE; - } - release_sock_fd( s, fd ); - if (!overlapped) { SetLastError( WSA_INVALID_PARAMETER ); diff --git a/server/sock.c b/server/sock.c index 88f6e4ac9fd..bb0d13d9e6c 100644 --- a/server/sock.c +++ b/server/sock.c @@ -2126,6 +2126,12 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) send_len = get_req_data_size() - sizeof(*params) - params->addr_len; addr = (const struct WS_sockaddr *)(params + 1);
+ if (!params->synchronous && !sock->bound) + { + set_error( STATUS_INVALID_PARAMETER ); + return 0; + } + if (sock->accept_recv_req) { set_error( STATUS_INVALID_PARAMETER );