From c005ffc3d70c14189952fa1041bab04462417308 Mon Sep 17 00:00:00 2001 From: Ian Sutton Date: Tue, 17 Jul 2018 08:50:22 -0500 Subject: Fix zero-index array bounds issue --- openbsd/Platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openbsd') 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.; } -- cgit v1.2.3