Fix NtQueryPerformanceCounter parameter checking. Spotted by Alex
Woods.
This commit is contained in:
parent
4390d003f4
commit
9ebbd3e514
@ -520,9 +520,12 @@ NTSTATUS WINAPI NtQueryPerformanceCounter(
|
|||||||
OUT PLARGE_INTEGER Frequency)
|
OUT PLARGE_INTEGER Frequency)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER time;
|
LARGE_INTEGER time;
|
||||||
|
|
||||||
|
if (!Counter) return STATUS_ACCESS_VIOLATION;
|
||||||
NtQuerySystemTime( &time );
|
NtQuerySystemTime( &time );
|
||||||
Counter->QuadPart = time.QuadPart;
|
Counter->QuadPart = time.QuadPart;
|
||||||
Frequency->QuadPart = 10000000;
|
if (Frequency)
|
||||||
|
Frequency->QuadPart = 10000000;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user