Source-Changes-HG archive

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

[src/netbsd-3-0]: src/sys/kern Pull up following revision(s) (requested by ch...



details:   https://anonhg.NetBSD.org/src/rev/84b590590223
branches:  netbsd-3-0
changeset: 579341:84b590590223
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sat Nov 11 21:43:16 2006 +0000

description:
Pull up following revision(s) (requested by christos in ticket #1574):
        sys/kern/sys_process.c: revision 1.112
check for negative length in PT_COREDUMP (from Neil)

diffstat:

 sys/kern/sys_process.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r ceeef92e3ff7 -r 84b590590223 sys/kern/sys_process.c
--- a/sys/kern/sys_process.c    Sat Nov 11 21:31:10 2006 +0000
+++ b/sys/kern/sys_process.c    Sat Nov 11 21:43:16 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sys_process.c,v 1.95.12.2 2006/10/26 10:23:23 tron Exp $       */
+/*     $NetBSD: sys_process.c,v 1.95.12.3 2006/11/11 21:43:16 bouyer Exp $     */
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -89,7 +89,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_process.c,v 1.95.12.2 2006/10/26 10:23:23 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_process.c,v 1.95.12.3 2006/11/11 21:43:16 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -355,7 +355,7 @@
                if ((path = SCARG(uap, addr)) != NULL) {
                        char *dst;
                        int len = SCARG(uap, data);
-                       if (len >= MAXPATHLEN)
+                       if (len < 0 || len >= MAXPATHLEN)
                                return EINVAL;
                        dst = malloc(len + 1, M_TEMP, M_WAITOK);
                        if ((error = copyin(path, dst, len)) != 0) {



Home | Main Index | Thread Index | Old Index