mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 14:53:40 +00:00
[Win32k]
- Fix crash while closing global hooked application. See CORE-10549. svn path=/trunk/; revision=69945
This commit is contained in:
parent
24d2342e66
commit
4d9fdd8b69
2 changed files with 12 additions and 3 deletions
|
@ -647,7 +647,13 @@ co_IntCallHookProc(INT HookId,
|
||||||
Common->offPfn = offPfn;
|
Common->offPfn = offPfn;
|
||||||
Common->Ansi = Ansi;
|
Common->Ansi = Ansi;
|
||||||
RtlZeroMemory(&Common->ModuleName, sizeof(Common->ModuleName));
|
RtlZeroMemory(&Common->ModuleName, sizeof(Common->ModuleName));
|
||||||
|
if (ModuleName->Buffer && ModuleName->Length)
|
||||||
|
{
|
||||||
RtlCopyMemory(&Common->ModuleName, ModuleName->Buffer, ModuleName->Length);
|
RtlCopyMemory(&Common->ModuleName, ModuleName->Buffer, ModuleName->Length);
|
||||||
|
// If ModuleName->Buffer NULL while in destroy,
|
||||||
|
// this will make User32:Hook.c complain about not loading the library module.
|
||||||
|
// Fix symptom for CORE-10549.
|
||||||
|
}
|
||||||
Extra = (PCHAR) Common + sizeof(HOOKPROC_CALLBACK_ARGUMENTS);
|
Extra = (PCHAR) Common + sizeof(HOOKPROC_CALLBACK_ARGUMENTS);
|
||||||
|
|
||||||
switch(HookId)
|
switch(HookId)
|
||||||
|
@ -738,7 +744,7 @@ co_IntCallHookProc(INT HookId,
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
ERR("Failure to make Callback! Status 0x%x",Status);
|
ERR("Failure to make Callback! Status 0x%x\n",Status);
|
||||||
goto Fault_Exit;
|
goto Fault_Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -342,6 +342,9 @@ co_CallHook( INT HookId,
|
||||||
case WH_KEYBOARD:
|
case WH_KEYBOARD:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!UserObjectInDestroy(UserHMGetHandle(phk))) //// Fix CORE-10549.
|
||||||
|
{
|
||||||
/* The odds are high for this to be a Global call. */
|
/* The odds are high for this to be a Global call. */
|
||||||
Result = co_IntCallHookProc( HookId,
|
Result = co_IntCallHookProc( HookId,
|
||||||
Code,
|
Code,
|
||||||
|
@ -352,7 +355,7 @@ co_CallHook( INT HookId,
|
||||||
phk->offPfn,
|
phk->offPfn,
|
||||||
phk->Ansi,
|
phk->Ansi,
|
||||||
&phk->ModuleName);
|
&phk->ModuleName);
|
||||||
|
}
|
||||||
/* The odds so high, no one is waiting for the results. */
|
/* The odds so high, no one is waiting for the results. */
|
||||||
if (pHP->pHookStructs) ExFreePoolWithTag(pHP->pHookStructs, TAG_HOOK);
|
if (pHP->pHookStructs) ExFreePoolWithTag(pHP->pHookStructs, TAG_HOOK);
|
||||||
ExFreePoolWithTag(pHP, TAG_HOOK);
|
ExFreePoolWithTag(pHP, TAG_HOOK);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue