mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[WIN23K]
Make sure to attach to the specified process before dereferencing ClientInfo, which is a user mode structure. CORE-l0017 #resolve svn path=/trunk/; revision=68702
This commit is contained in:
parent
ec86c24e97
commit
7052282507
1 changed files with 5 additions and 0 deletions
|
@ -2870,6 +2870,7 @@ NtUserWaitForInputIdle( IN HANDLE hProcess,
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
HANDLE Handles[3];
|
HANDLE Handles[3];
|
||||||
LARGE_INTEGER Timeout;
|
LARGE_INTEGER Timeout;
|
||||||
|
KAPC_STATE ApcState;
|
||||||
|
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
|
@ -2915,6 +2916,8 @@ NtUserWaitForInputIdle( IN HANDLE hProcess,
|
||||||
if (dwMilliseconds != INFINITE)
|
if (dwMilliseconds != INFINITE)
|
||||||
Timeout.QuadPart = (LONGLONG) dwMilliseconds * (LONGLONG) -10000;
|
Timeout.QuadPart = (LONGLONG) dwMilliseconds * (LONGLONG) -10000;
|
||||||
|
|
||||||
|
KeStackAttachProcess(&Process->Pcb, &ApcState);
|
||||||
|
|
||||||
W32Process->W32PF_flags |= W32PF_WAITFORINPUTIDLE;
|
W32Process->W32PF_flags |= W32PF_WAITFORINPUTIDLE;
|
||||||
for (pti = W32Process->ptiList; pti; pti = pti->ptiSibling)
|
for (pti = W32Process->ptiList; pti; pti = pti->ptiSibling)
|
||||||
{
|
{
|
||||||
|
@ -2922,6 +2925,8 @@ NtUserWaitForInputIdle( IN HANDLE hProcess,
|
||||||
pti->pClientInfo->dwTIFlags = pti->TIF_flags;
|
pti->pClientInfo->dwTIFlags = pti->TIF_flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
KeUnstackDetachProcess(&ApcState);
|
||||||
|
|
||||||
TRACE("WFII: ppi %p\n", W32Process);
|
TRACE("WFII: ppi %p\n", W32Process);
|
||||||
TRACE("WFII: waiting for %p\n", Handles[1] );
|
TRACE("WFII: waiting for %p\n", Handles[1] );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue