svn commit: r239471 - stable/9/libexec/rtld-elf

Alexander Kabaev kan at FreeBSD.org
Mon Aug 20 23:47:25 UTC 2012


Author: kan
Date: Mon Aug 20 23:47:24 2012
New Revision: 239471
URL: http://svn.freebsd.org/changeset/base/239471

Log:
  MFC r239470: Do not call process_nodelete with NULL object pointer.
  
  The place where the function is called can be reached if object loading
  and relocation fails too, in which case obj pointer will be NULL. Do not
  call process_nodelete then, or crash will follow.
  
  Pointy hat to: kan

Modified:
  stable/9/libexec/rtld-elf/rtld.c
Directory Properties:
  stable/9/libexec/rtld-elf/   (props changed)

Modified: stable/9/libexec/rtld-elf/rtld.c
==============================================================================
--- stable/9/libexec/rtld-elf/rtld.c	Mon Aug 20 23:43:03 2012	(r239470)
+++ stable/9/libexec/rtld-elf/rtld.c	Mon Aug 20 23:47:24 2012	(r239471)
@@ -2698,7 +2698,8 @@ dlopen_object(const char *name, int fd, 
 	     * This has to be done after we have loaded all of the
 	     * dependencies, so that we do not miss any.
 	     */
-	     process_nodelete(obj);
+	    if (obj != NULL)
+		process_nodelete(obj);
 	} else {
 	    /*
 	     * Bump the reference counts for objects on this DAG.  If


More information about the svn-src-stable-9 mailing list