summaryrefslogtreecommitdiffstats
path: root/sys/dev/systrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/systrace.c')
-rw-r--r--sys/dev/systrace.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/systrace.c b/sys/dev/systrace.c
index 2e2f1c18ab6..06612e658c4 100644
--- a/sys/dev/systrace.c
+++ b/sys/dev/systrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: systrace.c,v 1.24 2002/10/25 23:22:58 fgsch Exp $ */
+/* $OpenBSD: systrace.c,v 1.25 2002/11/10 04:34:56 art Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -664,6 +664,11 @@ systrace_redirect(int code, struct proc *p, void *v, register_t *retval)
return (EINVAL);
}
+ if (code < 0 || code >= p->p_emul->e_nsysent) {
+ systrace_unlock();
+ return (EINVAL);
+ }
+
KASSERT(strp->proc == p);
fst = strp->parent;