mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[Win32k]
- Users are not allowed to set null desktops. Fixes bug 6759. svn path=/trunk/; revision=56676
This commit is contained in:
parent
4f76ca4995
commit
4b39ab3f4a
1 changed files with 6 additions and 2 deletions
|
@ -1889,11 +1889,15 @@ IntSetThreadDesktop(IN HDESK hDesktop,
|
|||
BOOL APIENTRY
|
||||
NtUserSetThreadDesktop(HDESK hDesktop)
|
||||
{
|
||||
BOOL ret;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
UserEnterExclusive();
|
||||
|
||||
ret = IntSetThreadDesktop(hDesktop, FALSE);
|
||||
// FIXME: IntSetThreadDesktop validates the desktop handle, it should happen
|
||||
// here too and set the NT error level. Q. Is it necessary to have the validation
|
||||
// in IntSetThreadDesktop? Is it needed there too?
|
||||
if (hDesktop || (!hDesktop && CsrProcess == PsGetCurrentProcess()))
|
||||
ret = IntSetThreadDesktop(hDesktop, FALSE);
|
||||
|
||||
UserLeave();
|
||||
|
||||
|
|
Loading…
Reference in a new issue