Source-Changes-HG archive

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

[src/netbsd-6-0]: src/sys/compat/netbsd32 Pull up following revision(s) (requ...



details:   https://anonhg.NetBSD.org/src/rev/2dd4a6e04a06
branches:  netbsd-6-0
changeset: 774758:2dd4a6e04a06
user:      riz <riz%NetBSD.org@localhost>
date:      Fri Feb 08 20:46:01 2013 +0000

description:
Pull up following revision(s) (requested by hannken in ticket #793):
        sys/compat/netbsd32/netbsd32_execve.c: revision 1.37
netbsd32_posix_spawn_fa_alloc: use the right length for path allocation.
This error lead to memory pool corruption when freeing kmem with wrong size.

diffstat:

 sys/compat/netbsd32/netbsd32_execve.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 4b36959535a9 -r 2dd4a6e04a06 sys/compat/netbsd32/netbsd32_execve.c
--- a/sys/compat/netbsd32/netbsd32_execve.c     Fri Feb 08 20:30:54 2013 +0000
+++ b/sys/compat/netbsd32/netbsd32_execve.c     Fri Feb 08 20:46:01 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_execve.c,v 1.33.2.1 2012/04/12 17:05:38 riz Exp $     */
+/*     $NetBSD: netbsd32_execve.c,v 1.33.2.1.4.1 2013/02/08 20:46:01 riz Exp $ */
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_execve.c,v 1.33.2.1 2012/04/12 17:05:38 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_execve.c,v 1.33.2.1.4.1 2013/02/08 20:46:01 riz Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -141,7 +141,7 @@
                    MAXPATHLEN, &slen);
                if (error)
                        goto out;
-               fae->fae_path = kmem_alloc(fal, KM_SLEEP);
+               fae->fae_path = kmem_alloc(slen, KM_SLEEP);
                memcpy(fae->fae_path, pbuf, slen);
                fae->fae_oflag = f32->fae_oflag;
                fae->fae_mode = f32->fae_mode;



Home | Main Index | Thread Index | Old Index