mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:25:58 +00:00
Prevent possible access out of bounds when calculating CPU speed
svn path=/trunk/; revision=27563
This commit is contained in:
parent
aab51cffca
commit
9541d1c816
1 changed files with 7 additions and 0 deletions
|
@ -227,6 +227,13 @@ KiInitMachineDependent(VOID)
|
||||||
/* Move on */
|
/* Move on */
|
||||||
CurrentSample++;
|
CurrentSample++;
|
||||||
Sample++;
|
Sample++;
|
||||||
|
|
||||||
|
if (Sample == sizeof(Samples) / sizeof(Samples[0]))
|
||||||
|
{
|
||||||
|
/* Restart */
|
||||||
|
CurrentSample = Samples;
|
||||||
|
Sample = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Save the CPU Speed */
|
/* Save the CPU Speed */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue