From 9699260c5286942a6e3544221100951ac0d88ebe Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sat, 15 Mar 2008 21:21:10 +0000 Subject: In statclock(), fix local index type in the profiling code. Avoids out-of-bounds array accesses on some platforms. --- sys/kern/kern_clock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index 27c7bb79b74..f1227743ac1 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_clock.c,v 1.65 2007/10/10 15:53:53 art Exp $ */ +/* $OpenBSD: kern_clock.c,v 1.66 2008/03/15 21:21:09 miod Exp $ */ /* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */ /*- @@ -476,7 +476,7 @@ statclock(struct clockframe *frame) { #ifdef GPROF struct gmonparam *g; - int i; + u_long i; #endif struct cpu_info *ci = curcpu(); struct schedstate_percpu *spc = &ci->ci_schedstate; -- cgit v1.2.3