summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/aim
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-04-30 17:59:27 +0000
committerjhb <jhb@FreeBSD.org>2003-04-30 17:59:27 +0000
commit09adcd8b3eb9c21fbc4881b6dcc76de2ac5e2e86 (patch)
tree794ed311be7ea465256f3579da3310fcd612e9f1 /sys/powerpc/aim
parent5cf2683aab33151f21c4c06f9c3c1ac882d034a3 (diff)
downloadFreeBSD-src-09adcd8b3eb9c21fbc4881b6dcc76de2ac5e2e86.zip
FreeBSD-src-09adcd8b3eb9c21fbc4881b6dcc76de2ac5e2e86.tar.gz
Range check the syscall number before looking it up in the syscallnames[]
array. Submitted by: pho
Diffstat (limited to 'sys/powerpc/aim')
-rw-r--r--sys/powerpc/aim/trap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/powerpc/aim/trap.c b/sys/powerpc/aim/trap.c
index 22ec57a..ad87764 100644
--- a/sys/powerpc/aim/trap.c
+++ b/sys/powerpc/aim/trap.c
@@ -464,7 +464,7 @@ syscall(struct trapframe *frame)
STOPEVENT(p, S_SCX, code);
WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning",
- syscallnames[code]);
+ (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???");
mtx_assert(&sched_lock, MA_NOTOWNED);
mtx_assert(&Giant, MA_NOTOWNED);
}
OpenPOWER on IntegriCloud