Author: pschweitzer
Date: Sun May 5 16:38:41 2013
New Revision: 58945
URL:
http://svn.reactos.org/svn/reactos?rev=58945&view=rev
Log:
[KERNEL32]
If you workaround RtlAcquirePrivilege, do it properly!
Will prevent bad address freeing...
Modified:
trunk/reactos/dll/win32/kernel32/client/time.c
Modified: trunk/reactos/dll/win32/kernel32/client/time.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/time.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/time.c [iso-8859-1] Sun May 5 16:38:41 2013
@@ -379,11 +379,15 @@
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))