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
2034f515
Commit
2034f515
authored
Sep 17, 2013
by
Bruno Jesus
Committed by
Alexandre Julliard
Sep 17, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Do not allow socket creation if WSAStartup was not called.
parent
0298165b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
socket.c
dlls/ws2_32/socket.c
+6
-0
sock.c
dlls/ws2_32/tests/sock.c
+0
-1
No files found.
dlls/ws2_32/socket.c
View file @
2034f515
...
...
@@ -5878,6 +5878,12 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
TRACE
(
"af=%d type=%d protocol=%d protocol_info=%p group=%d flags=0x%x
\n
"
,
af
,
type
,
protocol
,
lpProtocolInfo
,
g
,
dwFlags
);
if
(
!
num_startup
)
{
err
=
WSANOTINITIALISED
;
goto
done
;
}
/* hack for WSADuplicateSocket */
if
(
lpProtocolInfo
&&
lpProtocolInfo
->
dwServiceFlags4
==
0xff00ff00
)
{
ret
=
lpProtocolInfo
->
dwServiceFlags3
;
...
...
dlls/ws2_32/tests/sock.c
View file @
2034f515
...
...
@@ -975,7 +975,6 @@ static void test_WithoutWSAStartup(void)
WSASetLastError
(
0xdeadbeef
);
ok
(
WSASocketA
(
0
,
0
,
0
,
NULL
,
0
,
0
)
==
INVALID_SOCKET
,
"WSASocketA should have failed
\n
"
);
err
=
WSAGetLastError
();
todo_wine
ok
(
err
==
WSANOTINITIALISED
,
"Expected 10093, received %d
\n
"
,
err
);
WSASetLastError
(
0xdeadbeef
);
...
...
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