mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-01 12:23:29 +00:00
[WIN32K]
Fix possible NULL pointer dereferences. Spotted by Amine Khaldi. svn path=/trunk/; revision=49309
This commit is contained in:
@@ -941,6 +941,12 @@ W32kKeyProcessMessage(LPMSG Msg,
|
||||
VscVkTable = KeyboardLayout->pVSCtoVK_E1;
|
||||
}
|
||||
|
||||
if (!VscVkTable)
|
||||
{
|
||||
DPRINT1("somethings wrong, Prefix=0x%x", Prefix);
|
||||
return;
|
||||
}
|
||||
|
||||
RawVk = 0xff;
|
||||
while (VscVkTable->Vsc)
|
||||
{
|
||||
|
||||
@@ -2492,18 +2492,23 @@ NtUserMessageCall(
|
||||
UserEnterExclusive();
|
||||
|
||||
/* Validate input */
|
||||
if (hWnd && (hWnd != INVALID_HANDLE_VALUE) && !(Window = UserGetWindowObject(hWnd)))
|
||||
if (hWnd && (hWnd != INVALID_HANDLE_VALUE))
|
||||
{
|
||||
UserLeave();
|
||||
return FALSE;
|
||||
Window = UserGetWindowObject(hWnd);
|
||||
if (!Window)
|
||||
{
|
||||
UserLeave();
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
switch(dwType)
|
||||
{
|
||||
case FNID_DEFWINDOWPROC:
|
||||
UserRefObjectCo(Window, &Ref);
|
||||
if (Window) UserRefObjectCo(Window, &Ref);
|
||||
lResult = IntDefWindowProc(Window, Msg, wParam, lParam, Ansi);
|
||||
Ret = TRUE;
|
||||
UserDerefObjectCo(Window);
|
||||
if (Window) UserDerefObjectCo(Window);
|
||||
break;
|
||||
case FNID_SENDNOTIFYMESSAGE:
|
||||
Ret = UserSendNotifyMessage(hWnd, Msg, wParam, lParam);
|
||||
|
||||
Reference in New Issue
Block a user