mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Make sure that NtSetSystemTime won't crash if the new systen time is NULL.
svn path=/trunk/; revision=11539
This commit is contained in:
parent
c37b036361
commit
e24dc12954
1 changed files with 10 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: time.c,v 1.21 2004/08/15 16:39:01 chorns Exp $
|
||||
/* $Id: time.c,v 1.22 2004/11/05 11:46:02 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -37,8 +37,8 @@ ExInitTimeZoneInfo (VOID)
|
|||
|
||||
|
||||
NTSTATUS STDCALL
|
||||
NtSetSystemTime (IN PLARGE_INTEGER UnsafeNewSystemTime,
|
||||
OUT PLARGE_INTEGER UnsafeOldSystemTime OPTIONAL)
|
||||
NtSetSystemTime(IN PLARGE_INTEGER UnsafeNewSystemTime,
|
||||
OUT PLARGE_INTEGER UnsafeOldSystemTime OPTIONAL)
|
||||
/*
|
||||
* FUNCTION: Sets the system time.
|
||||
* PARAMETERS:
|
||||
|
@ -56,6 +56,13 @@ NtSetSystemTime (IN PLARGE_INTEGER UnsafeNewSystemTime,
|
|||
|
||||
/* FIXME: Check for SeSystemTimePrivilege */
|
||||
|
||||
if (UnsafeNewSystemTime == NULL)
|
||||
{
|
||||
/* FIXME: update time zone settings */
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
Status = MmCopyFromCaller(&NewSystemTime, UnsafeNewSystemTime,
|
||||
sizeof(NewSystemTime));
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
|
Loading…
Reference in a new issue