Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c2eb5a0f
Commit
c2eb5a0f
authored
Jun 23, 2020
by
Paul Gofman
Committed by
Alexandre Julliard
Jun 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netio.sys: Check for callback address before reusing pending IO structure.
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8f80ea67
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
9 deletions
+24
-9
netio.c
dlls/netio.sys/netio.c
+24
-9
No files found.
dlls/netio.sys/netio.c
View file @
c2eb5a0f
...
...
@@ -59,6 +59,7 @@ struct wsk_pending_io
{
OVERLAPPED
ovr
;
TP_WAIT
*
tp_wait
;
void
*
callback
;
IRP
*
irp
;
};
...
...
@@ -159,27 +160,41 @@ static struct wsk_pending_io *allocate_pending_io(struct wsk_socket_internal *so
PTP_WAIT_CALLBACK
socket_async_callback
,
IRP
*
irp
)
{
struct
wsk_pending_io
*
io
=
socket
->
pending_io
;
unsigned
int
i
;
unsigned
int
i
,
io_index
;
io_index
=
~
0u
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
socket
->
pending_io
);
++
i
)
{
if
(
!
io
[
i
].
irp
)
break
;
{
if
(
io
[
i
].
callback
==
socket_async_callback
)
{
io
[
i
].
irp
=
irp
;
return
&
io
[
i
];
}
if
(
io_index
==
~
0u
)
io_index
=
i
;
}
}
if
(
i
==
ARRAY_SIZE
(
socket
->
pending_io
)
)
if
(
i
o_index
==
~
0u
)
{
FIXME
(
"Pending io requests count exceeds limit.
\n
"
);
return
NULL
;
}
io
[
i
].
irp
=
irp
;
io
[
i
o_index
].
irp
=
irp
;
if
(
io
[
i
].
tp_wait
)
return
&
io
[
i
];
if
(
io
[
io_index
].
tp_wait
)
CloseThreadpoolWait
(
io
[
io_index
].
tp_wait
);
else
io
[
io_index
].
ovr
.
hEvent
=
CreateEventA
(
NULL
,
FALSE
,
FALSE
,
NULL
);
io
[
i
].
ovr
.
hEvent
=
CreateEventA
(
NULL
,
FALSE
,
FALSE
,
NULL
);
io
[
i
].
tp_wait
=
CreateThreadpoolWait
(
socket_async_callback
,
socket
,
NULL
)
;
io
[
i
o_index
].
tp_wait
=
CreateThreadpoolWait
(
socket_async_callback
,
socket
,
NULL
);
io
[
i
o_index
].
callback
=
socket_async_callback
;
return
&
io
[
i
];
return
&
io
[
i
o_index
];
}
static
struct
wsk_pending_io
*
find_pending_io
(
struct
wsk_socket_internal
*
socket
,
TP_WAIT
*
tp_wait
)
...
...
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