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/e28f15b7f725
branches: trunk
changeset: 537607:e28f15b7f725
user: itojun <itojun%NetBSD.org@localhost>
date: Thu Oct 03 04:57:39 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 51081033d438 -r e28f15b7f725 sys/kern/kern_resource.c
--- a/sys/kern/kern_resource.c Thu Oct 03 04:52:51 2002 +0000
+++ b/sys/kern/kern_resource.c Thu Oct 03 04:57:39 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_resource.c,v 1.65 2002/10/03 04:52:51 itojun Exp $ */
+/* $NetBSD: kern_resource.c,v 1.66 2002/10/03 04:57:39 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.65 2002/10/03 04:52:51 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_resource.c,v 1.66 2002/10/03 04:57:39 itojun Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -251,7 +251,7 @@
struct plimit *newplim;
int error;
- if ((u_int)which >= RLIM_NLIMITS)
+ if (which < 0 || (u_int)which >= RLIM_NLIMITS)
return (EINVAL);
if (limp->rlim_cur < 0 || limp->rlim_max < 0)
Home |
Main Index |
Thread Index |
Old Index