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
0875d6e9
Commit
0875d6e9
authored
Dec 14, 1998
by
Stephen Langasek
Committed by
Alexandre Julliard
Dec 14, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent segfault in setsockopt when optname is SO_LINGER and optval is
null.
parent
882c1bef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
winsock.c
misc/winsock.c
+3
-1
No files found.
misc/winsock.c
View file @
0875d6e9
...
...
@@ -1477,10 +1477,12 @@ INT32 WINAPI WINSOCK_setsockopt32(SOCKET16 s, INT32 level, INT32 optname,
struct
linger
linger
;
convert_sockopt
(
&
level
,
&
optname
);
if
(
optname
==
SO_LINGER
)
{
if
(
optname
==
SO_LINGER
&&
optval
)
{
/* yes, uses unsigned short in both win16/win32 */
linger
.
l_onoff
=
((
UINT16
*
)
optval
)[
0
];
linger
.
l_linger
=
((
UINT16
*
)
optval
)[
1
];
/* FIXME: what is documented behavior if SO_LINGER optval
is null?? */
optval
=
(
char
*
)
&
linger
;
optlen
=
sizeof
(
struct
linger
);
}
...
...
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