diff options
author | Ian Sutton <ians@openbsd.org> | 2018-07-17 08:50:22 -0500 |
---|---|---|
committer | Ian Sutton <ians@openbsd.org> | 2018-07-17 08:50:22 -0500 |
commit | c005ffc3d70c14189952fa1041bab04462417308 (patch) | |
tree | 199a5b9a9d5ad796fbec839e91e9a14ca6dab5b2 /openbsd | |
parent | 48b807b0ff892d41387f6cedfb3668e2bcc246ac (diff) |
Fix zero-index array bounds issue
Diffstat (limited to 'openbsd')
-rw-r--r-- | openbsd/Platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsd/Platform.c b/openbsd/Platform.c index cda424b6..a3648f4e 100644 --- a/openbsd/Platform.c +++ b/openbsd/Platform.c @@ -220,7 +220,7 @@ double Platform_setCPUValues(Meter* this, int cpu) { percentages(CPUSTATES, diff_v, new_v, (int64_t *)old_v[cpu-1], scratch_v); - for (i = 0; i < CPUSTATES; i++) { + for (i = 0; i < CPUSTATES - 1; i++) { old_v[cpu-1][i] = new_v[i]; v[i] = diff_v[i] / 10.; } |