mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 18:16:29 +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 */
|
||||
CurrentSample++;
|
||||
Sample++;
|
||||
|
||||
if (Sample == sizeof(Samples) / sizeof(Samples[0]))
|
||||
{
|
||||
/* Restart */
|
||||
CurrentSample = Samples;
|
||||
Sample = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Save the CPU Speed */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue