Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern check negative arg. from openbsd
details: https://anonhg.NetBSD.org/src/rev/51081033d438
branches: trunk
changeset: 537606:51081033d438
user: itojun <itojun%NetBSD.org@localhost>
date: Thu Oct 03 04:52:51 2002 +0000
description:
check negative arg. from openbsd
diffstat:
sys/kern/kern_resource.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r c25b89378aa7 -r 51081033d438 sys/kern/kern_resource.c
--- a/sys/kern/kern_resource.c Thu Oct 03 03:58:56 2002 +0000
+++ b/sys/kern/kern_resource.c Thu Oct 03 04:52:51 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_resource.c,v 1.64 2002/09/04 01:32:34 matt Exp $ */
+/* $NetBSD: kern_resource.c,v 1.65 2002/10/03 04:52:51 itojun Exp $ */
/*-
* Copyright (c) 1982, 1986, 1991, 1993
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_resource.c,v 1.64 2002/09/04 01:32:34 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_resource.c,v 1.65 2002/10/03 04:52:51 itojun Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -369,7 +369,7 @@
} */ *uap = v;
int which = SCARG(uap, which);
- if ((u_int)which >= RLIM_NLIMITS)
+ if (which < 0 || (u_int)which >= RLIM_NLIMITS)
return (EINVAL);
return (copyout(&p->p_rlimit[which], SCARG(uap, rlp),
sizeof(struct rlimit)));
Home |
Main Index |
Thread Index |
Old Index