diff options
Diffstat (limited to 'sys/kern/kern_resource.c')
-rw-r--r-- | sys/kern/kern_resource.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index 7a46034050b..2255546af14 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_resource.c,v 1.19 2002/07/21 21:29:33 art Exp $ */ +/* $OpenBSD: kern_resource.c,v 1.20 2002/10/02 21:56:30 nordin Exp $ */ /* $NetBSD: kern_resource.c,v 1.38 1996/10/23 07:19:38 matthias Exp $ */ /*- @@ -324,11 +324,11 @@ sys_getrlimit(p, v, retval) register_t *retval; { register struct sys_getrlimit_args /* { - syscallarg(u_int) which; + syscallarg(int) which; syscallarg(struct rlimit *) rlp; } */ *uap = v; - if (SCARG(uap, which) >= RLIM_NLIMITS) + if (SCARG(uap, which) < 0 || SCARG(uap, which) >= RLIM_NLIMITS) return (EINVAL); return (copyout((caddr_t)&p->p_rlimit[SCARG(uap, which)], (caddr_t)SCARG(uap, rlp), sizeof (struct rlimit))); |