mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 17:36:14 +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:
parent
5d4c6981e0
commit
3c4b46ea62
1 changed files with 5 additions and 1 deletions
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue