mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[KERNEL32]
If you workaround RtlAcquirePrivilege, do it properly! Will prevent bad address freeing... svn path=/trunk/; revision=58945
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user