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
dcf25868
Commit
dcf25868
authored
Feb 26, 2017
by
Bruno Jesus
Committed by
Alexandre Julliard
Feb 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Cope with NULL address in connect() call.
Signed-off-by:
Bruno Jesus
<
bjesus@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5a06b6b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
socket.c
dlls/ws2_32/socket.c
+5
-2
sock.c
dlls/ws2_32/tests/sock.c
+5
-0
No files found.
dlls/ws2_32/socket.c
View file @
dcf25868
...
...
@@ -1731,14 +1731,17 @@ static inline BOOL supported_protocol(int protocol)
/**********************************************************************/
/* Returns the length of the converted address if successful, 0 if it was too
small to
* s
tart with
.
/* Returns the length of the converted address if successful, 0 if it was too
* s
mall to start with or unknown family or invalid address buffer
.
*/
static
unsigned
int
ws_sockaddr_ws2u
(
const
struct
WS_sockaddr
*
wsaddr
,
int
wsaddrlen
,
union
generic_unix_sockaddr
*
uaddr
)
{
unsigned
int
uaddrlen
=
0
;
if
(
!
wsaddr
)
return
0
;
switch
(
wsaddr
->
sa_family
)
{
#ifdef HAS_IPX
...
...
dlls/ws2_32/tests/sock.c
View file @
dcf25868
...
...
@@ -5841,6 +5841,11 @@ static void test_events(int useMessages)
goto
end
;
}
SetLastError
(
0xdeadbeef
);
ret
=
connect
(
src
,
NULL
,
0
);
ok
(
ret
==
SOCKET_ERROR
,
"expected -1, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
WSAEFAULT
,
"expected 10014, got %d
\n
"
,
GetLastError
());
ret
=
connect
(
src
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
));
if
(
ret
==
SOCKET_ERROR
&&
WSAGetLastError
()
!=
WSAEWOULDBLOCK
)
{
...
...
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