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
6cd1a7d9
Commit
6cd1a7d9
authored
Jul 30, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Authors: Robert Shearman <rob@codeweavers.com>, Mike Hearn <mh@codeweavers.com>
Fix infinite loops by checking the return value of _invoke_onereq and bailing appropriately.
parent
4c3d6617
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
rpc.c
dlls/ole32/rpc.c
+9
-5
No files found.
dlls/ole32/rpc.c
View file @
6cd1a7d9
...
...
@@ -392,19 +392,22 @@ RPC_QueueRequestAndWait(wine_rpc_request *req) {
/* This loop is about allowing re-entrancy. While waiting for the
* response to one RPC we may receive a request starting another. */
while
(
1
)
{
while
(
!
hres
)
{
hres
=
_read_one
(
xpipe
);
if
(
hres
)
break
;
for
(
i
=
0
;
i
<
nrofreqs
;
i
++
)
{
xreq
=
reqs
[
i
];
if
((
xreq
->
state
==
REQSTATE_REQ_GOT
)
&&
(
xreq
->
hPipe
==
req
->
hPipe
))
{
_invoke_onereq
(
xreq
);
hres
=
_invoke_onereq
(
xreq
);
if
(
hres
)
break
;
}
}
if
(
req
->
state
==
REQSTATE_RESP_GOT
)
return
S_OK
;
}
if
(
FAILED
(
hres
))
WARN
(
"-- 0x%08lx
\n
"
,
hres
);
return
hres
;
}
...
...
@@ -734,10 +737,10 @@ static DWORD WINAPI
_StubReaderThread
(
LPVOID
param
)
{
wine_pipe
*
xpipe
=
(
wine_pipe
*
)
param
;
HANDLE
xhPipe
=
xpipe
->
hPipe
;
HRESULT
hres
;
HRESULT
hres
=
S_OK
;
TRACE
(
"STUB reader thread %lx
\n
"
,
GetCurrentProcessId
());
while
(
1
)
{
while
(
!
hres
)
{
int
i
;
hres
=
_read_one
(
xpipe
);
if
(
hres
)
break
;
...
...
@@ -745,7 +748,8 @@ _StubReaderThread(LPVOID param) {
for
(
i
=
nrofreqs
;
i
--
;)
{
wine_rpc_request
*
xreq
=
reqs
[
i
];
if
((
xreq
->
state
==
REQSTATE_REQ_GOT
)
&&
(
xreq
->
hPipe
==
xhPipe
))
{
_invoke_onereq
(
xreq
);
hres
=
_invoke_onereq
(
xreq
);
if
(
!
hres
)
break
;
}
}
}
...
...
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