mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[WIN32K] Fix alignment checks in NtUserSetInformationThread
Fixes random failures on x64.
This commit is contained in:
parent
6ca8eb5c1e
commit
83e1193fb2
1 changed files with 4 additions and 4 deletions
|
@ -701,7 +701,7 @@ NtUserSetInformationThread(IN HANDLE ThreadHandle,
|
|||
|
||||
TRACE("Shutdown initiated\n");
|
||||
|
||||
if (ThreadInformationLength != sizeof(ULONG))
|
||||
if (ThreadInformationLength != sizeof(CapturedFlags))
|
||||
{
|
||||
Status = STATUS_INFO_LENGTH_MISMATCH;
|
||||
break;
|
||||
|
@ -711,7 +711,7 @@ NtUserSetInformationThread(IN HANDLE ThreadHandle,
|
|||
Status = STATUS_SUCCESS;
|
||||
_SEH2_TRY
|
||||
{
|
||||
ProbeForWrite(ThreadInformation, sizeof(CapturedFlags), sizeof(PVOID));
|
||||
ProbeForWrite(ThreadInformation, sizeof(CapturedFlags), __alignof(CapturedFlags));
|
||||
CapturedFlags = *(PULONG)ThreadInformation;
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
|
@ -753,7 +753,7 @@ NtUserSetInformationThread(IN HANDLE ThreadHandle,
|
|||
Status = STATUS_SUCCESS;
|
||||
_SEH2_TRY
|
||||
{
|
||||
ProbeForRead(ThreadInformation, sizeof(ShutdownStatus), sizeof(PVOID));
|
||||
ProbeForRead(ThreadInformation, sizeof(ShutdownStatus), __alignof(ShutdownStatus));
|
||||
ShutdownStatus = *(NTSTATUS*)ThreadInformation;
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
|
@ -783,7 +783,7 @@ NtUserSetInformationThread(IN HANDLE ThreadHandle,
|
|||
Status = STATUS_SUCCESS;
|
||||
_SEH2_TRY
|
||||
{
|
||||
ProbeForRead(ThreadInformation, sizeof(CsrPortHandle), sizeof(PVOID));
|
||||
ProbeForRead(ThreadInformation, sizeof(CsrPortHandle), __alignof(CsrPortHandle));
|
||||
CsrPortHandle = *(PHANDLE)ThreadInformation;
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
|
|
Loading…
Reference in a new issue