Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/sys/kern Pull up revision 1.142 via patch (requested by...



details:   https://anonhg.NetBSD.org/src/rev/2f4dcb42e5df
branches:  netbsd-1-6
changeset: 530607:2f4dcb42e5df
user:      tron <tron%NetBSD.org@localhost>
date:      Sun Aug 24 09:33:27 2003 +0000

description:
Pull up revision 1.142 via patch (requested by itojun in ticket #1435):
make proc.curproc.* check more strict.  atatat

diffstat:

 sys/kern/kern_sysctl.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 19c02a0b6fa3 -r 2f4dcb42e5df sys/kern/kern_sysctl.c
--- a/sys/kern/kern_sysctl.c    Sat Aug 23 06:46:44 2003 +0000
+++ b/sys/kern/kern_sysctl.c    Sun Aug 24 09:33:27 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_sysctl.c,v 1.108 2002/05/14 02:58:32 matt Exp $   */
+/*     $NetBSD: kern_sysctl.c,v 1.108.4.1 2003/08/24 09:33:27 tron Exp $       */
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.108 2002/05/14 02:58:32 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.108.4.1 2003/08/24 09:33:27 tron Exp $");
 
 #include "opt_ddb.h"
 #include "opt_insecure.h"
@@ -797,7 +797,8 @@
                return (error);
        }
        if (name[1] == PROC_PID_LIMIT) {
-               if (namelen != 4 || name[2] >= PROC_PID_LIMIT_MAXID)
+               if (namelen != 4 || name[2] < 1 ||
+                   name[2] >= PROC_PID_LIMIT_MAXID)
                        return EINVAL;
                memcpy(&alim, &ptmp->p_rlimit[name[2] - 1], sizeof(alim));
                if (name[3] == PROC_PID_LIMIT_TYPE_HARD)



Home | Main Index | Thread Index | Old Index