mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-01 12:23:29 +00:00
Prevent possible access out of bounds when calculating CPU speed
svn path=/trunk/; revision=27563
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user