[KERNEL32]

If you workaround RtlAcquirePrivilege, do it properly!
Will prevent bad address freeing...

svn path=/trunk/; revision=58945
This commit is contained in:
Pierre Schweitzer 2013-05-05 16:38:41 +00:00
parent 5d4c6981e0
commit 3c4b46ea62

View file

@ -379,12 +379,16 @@ SetLocalTime(IN CONST SYSTEMTIME *lpSystemTime)
NewSystemTime.QuadPart += TimeZoneBias.QuadPart;
Status = RtlAcquirePrivilege(&Privilege, 1, 0, &State);
Status = STATUS_SUCCESS;
if (NT_SUCCESS(Status))
{
Status = NtSetSystemTime(&NewSystemTime, NULL);
RtlReleasePrivilege(State);
}
else
{
DPRINT1("Workaround RtlAcquirePrivilege failure!\n");
Status = NtSetSystemTime(&NewSystemTime, NULL);
}
if (!NT_SUCCESS(Status))
{