mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[WIN32K]
Fix possible NULL pointer dereference. Spotted by Amine Khaldi. svn path=/trunk/; revision=49303
This commit is contained in:
parent
58781041d7
commit
08810169e7
1 changed files with 9 additions and 5 deletions
|
@ -299,17 +299,21 @@ NtUserNotifyWinEvent(
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
/* Validate input */
|
/* Validate input */
|
||||||
if (hWnd && (hWnd != INVALID_HANDLE_VALUE) && !(Window = UserGetWindowObject(hWnd)))
|
if (hWnd && (hWnd != INVALID_HANDLE_VALUE))
|
||||||
{
|
{
|
||||||
UserLeave();
|
Window = UserGetWindowObject(hWnd);
|
||||||
return;
|
if (!Window)
|
||||||
|
{
|
||||||
|
UserLeave();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gpsi->dwInstalledEventHooks & GetMaskFromEvent(Event))
|
if (gpsi->dwInstalledEventHooks & GetMaskFromEvent(Event))
|
||||||
{
|
{
|
||||||
UserRefObjectCo(Window, &Ref);
|
if (Window) UserRefObjectCo(Window, &Ref);
|
||||||
IntNotifyWinEvent( Event, Window, idObject, idChild, WEF_SETBYWNDPTI);
|
IntNotifyWinEvent( Event, Window, idObject, idChild, WEF_SETBYWNDPTI);
|
||||||
UserDerefObjectCo(Window);
|
if (Window) UserDerefObjectCo(Window);
|
||||||
}
|
}
|
||||||
UserLeave();
|
UserLeave();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue