mirror of
https://github.com/reactos/reactos.git
synced 2024-07-31 00:28:56 +00:00
[win32k]
- Peb->ProcessParameters->DesktopInfo must be probed and captured with SEH before used in win32k svn path=/trunk/; revision=55745
This commit is contained in:
parent
42dde0a3ef
commit
6e4d714573
|
@ -238,7 +238,7 @@ Win32kThreadCallback(struct _ETHREAD *Thread,
|
||||||
HWINSTA hWinSta = NULL;
|
HWINSTA hWinSta = NULL;
|
||||||
PCLIENTINFO pci;
|
PCLIENTINFO pci;
|
||||||
HDESK hDesk = NULL;
|
HDESK hDesk = NULL;
|
||||||
PUNICODE_STRING DesktopPath;
|
UNICODE_STRING DesktopPath;
|
||||||
PDESKTOP pdesk;
|
PDESKTOP pdesk;
|
||||||
PRTL_USER_PROCESS_PARAMETERS ProcessParams = Process->Peb->ProcessParameters;
|
PRTL_USER_PROCESS_PARAMETERS ProcessParams = Process->Peb->ProcessParameters;
|
||||||
|
|
||||||
|
@ -297,11 +297,24 @@ Win32kThreadCallback(struct _ETHREAD *Thread,
|
||||||
* inherit the thread desktop and process window station (if not yet inherited) from the process startup
|
* inherit the thread desktop and process window station (if not yet inherited) from the process startup
|
||||||
* info structure. See documentation of CreateProcess()
|
* info structure. See documentation of CreateProcess()
|
||||||
*/
|
*/
|
||||||
DesktopPath = (ProcessParams ? ((ProcessParams->DesktopInfo.Length > 0) ? &ProcessParams->DesktopInfo : NULL) : NULL);
|
Status = STATUS_UNSUCCESSFUL;
|
||||||
|
if(ProcessParams && ProcessParams->DesktopInfo.Length > 0)
|
||||||
|
{
|
||||||
|
Status = IntSafeCopyUnicodeStringTerminateNULL(&DesktopPath, &ProcessParams->DesktopInfo);
|
||||||
|
}
|
||||||
|
if(!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
RtlInitUnicodeString(&DesktopPath, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
Status = IntParseDesktopPath(Process,
|
Status = IntParseDesktopPath(Process,
|
||||||
DesktopPath,
|
&DesktopPath,
|
||||||
&hWinSta,
|
&hWinSta,
|
||||||
&hDesk);
|
&hDesk);
|
||||||
|
|
||||||
|
if (DesktopPath.Buffer)
|
||||||
|
ExFreePoolWithTag(DesktopPath.Buffer, TAG_STRING);
|
||||||
|
|
||||||
if(!NT_SUCCESS(Status))
|
if(!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
ERR_CH(UserThread, "Failed to assign default dekstop and winsta to process\n");
|
ERR_CH(UserThread, "Failed to assign default dekstop and winsta to process\n");
|
||||||
|
@ -545,6 +558,7 @@ DriverEntry(
|
||||||
NT_ROF(InitKeyboardImpl());
|
NT_ROF(InitKeyboardImpl());
|
||||||
NT_ROF(MsqInitializeImpl());
|
NT_ROF(MsqInitializeImpl());
|
||||||
NT_ROF(InitTimerImpl());
|
NT_ROF(InitTimerImpl());
|
||||||
|
NT_ROF(InitDCEImpl());
|
||||||
|
|
||||||
/* Initialize FreeType library */
|
/* Initialize FreeType library */
|
||||||
if (!InitFontSupport())
|
if (!InitFontSupport())
|
||||||
|
|
Loading…
Reference in a new issue