mirror of
https://github.com/reactos/reactos.git
synced 2025-02-21 16:04:57 +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();
|
||||
|
||||
/* Validate input */
|
||||
if (hWnd && (hWnd != INVALID_HANDLE_VALUE) && !(Window = UserGetWindowObject(hWnd)))
|
||||
if (hWnd && (hWnd != INVALID_HANDLE_VALUE))
|
||||
{
|
||||
UserLeave();
|
||||
return;
|
||||
Window = UserGetWindowObject(hWnd);
|
||||
if (!Window)
|
||||
{
|
||||
UserLeave();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (gpsi->dwInstalledEventHooks & GetMaskFromEvent(Event))
|
||||
{
|
||||
UserRefObjectCo(Window, &Ref);
|
||||
if (Window) UserRefObjectCo(Window, &Ref);
|
||||
IntNotifyWinEvent( Event, Window, idObject, idChild, WEF_SETBYWNDPTI);
|
||||
UserDerefObjectCo(Window);
|
||||
if (Window) UserDerefObjectCo(Window);
|
||||
}
|
||||
UserLeave();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue