Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2012 22:42:47 +0000 (UTC)
From:      Alexander Kabaev <kan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org
Subject:   svn commit: r239546 - releng/9.1/libexec/rtld-elf
Message-ID:  <201208212242.q7LMglOF020003@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kan
Date: Tue Aug 21 22:42:46 2012
New Revision: 239546
URL: http://svn.freebsd.org/changeset/base/239546

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
  Approved by: re (kib)

Modified:
  releng/9.1/libexec/rtld-elf/rtld.c
Directory Properties:
  releng/9.1/libexec/rtld-elf/   (props changed)

Modified: releng/9.1/libexec/rtld-elf/rtld.c
==============================================================================
--- releng/9.1/libexec/rtld-elf/rtld.c	Tue Aug 21 22:28:14 2012	(r239545)
+++ releng/9.1/libexec/rtld-elf/rtld.c	Tue Aug 21 22:42:46 2012	(r239546)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208212242.q7LMglOF020003>