Source-Changes-HG archive

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

[src/netbsd-6]: src/sys/kern Pull up following revision(s) (requested by maxv...



details:   https://anonhg.NetBSD.org/src/rev/643612fbec7e
branches:  netbsd-6
changeset: 776664:643612fbec7e
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Jul 14 06:21:22 2014 +0000

description:
Pull up following revision(s) (requested by maxv in ticket #1097):
        sys/kern/kern_core.c: revision 1.23
Fix a read-beyond-end string read.

diffstat:

 sys/kern/kern_core.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r b85520ae2d1d -r 643612fbec7e sys/kern/kern_core.c
--- a/sys/kern/kern_core.c      Wed Jul 09 09:50:24 2014 +0000
+++ b/sys/kern/kern_core.c      Mon Jul 14 06:21:22 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_core.c,v 1.20 2011/09/24 22:53:50 christos Exp $  */
+/*     $NetBSD: kern_core.c,v 1.20.8.1 2014/07/14 06:21:22 msaitoh Exp $       */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_core.c,v 1.20 2011/09/24 22:53:50 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_core.c,v 1.20.8.1 2014/07/14 06:21:22 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/vnode.h>
@@ -155,6 +155,12 @@
        error = coredump_buildname(p, name, pattern, MAXPATHLEN);
        mutex_exit(&lim->pl_lock);
 
+       if (error) {
+               mutex_exit(p->p_lock);
+               mutex_exit(proc_lock);
+               goto done;
+       }
+
        /*
         * On a simple filename, see if the filesystem allow us to write
         * core dumps there.



Home | Main Index | Thread Index | Old Index