Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
93d001fa
Commit
93d001fa
authored
Jun 16, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Check if the socket is bound in ConnectEx() in the server.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5295cc27
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
12 deletions
+6
-12
socket.c
dlls/ws2_32/socket.c
+0
-12
sock.c
server/sock.c
+6
-0
No files found.
dlls/ws2_32/socket.c
View file @
93d001fa
...
...
@@ -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
);
...
...
server/sock.c
View file @
93d001fa
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment