]> sourceware.org Git - glibc.git/commitdiff
Hurd: fix use of uninitialized value in fork port copying.
authorRoland McGrath <mcgrathr@chromium.org>
Thu, 8 Sep 2011 16:37:42 +0000 (09:37 -0700)
committerRoland McGrath <mcgrathr@chromium.org>
Thu, 8 Sep 2011 16:37:42 +0000 (09:37 -0700)
ChangeLog
sysdeps/mach/hurd/fork.c

index 91328e0483bd22b88031ed0594c7c97a10fecdc0..5b0d57146eee07178c9a4f73d2ea84acb91a2cb6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
+2011-09-08  Roland McGrath  <roland@hack.frob.com>
+
+       * sysdeps/mach/hurd/fork.c (__fork): Initialize REFS so we don't use a
+       garbage value in a __mach_port_mod_refs call in the cases of the
+       task-self and thread-self ports.
+
 2011-09-08  Andreas Schwab  <schwab@redhat.com>
 
-       * elf/dl-load.c (lose): Check for non-null l.
+       * elf/dl-load.c (lose): Check for non-null L.
 
 2011-09-07  Ulrich Drepper  <drepper@gmail.com>
 
index 3288f186e5066b22323a30076d71da2a10f74074..66fa7e27bc927b36a0dd924e6aa967455b741969 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994,1995,1996,1997,1999,2001,2002,2004,2005,2006
+/* Copyright (C) 1994,1995,1996,1997,1999,2001,2002,2004,2005,2006,2011
        Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -313,7 +313,7 @@ __fork (void)
            {
              /* This is a send right or a dead name.
                 Give the child as many references for it as we have.  */
-             mach_port_urefs_t refs, *record_refs = NULL;
+             mach_port_urefs_t refs = 0, *record_refs = NULL;
              mach_port_t insert;
              mach_msg_type_name_t insert_type = MACH_MSG_TYPE_COPY_SEND;
              if (portnames[i] == newtask || portnames[i] == newproc)
This page took 0.046814 seconds and 5 git commands to generate.