Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Mar 2009 15:54:09 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r190505 - head/libexec/rtld-elf
Message-ID:  <200903281554.n2SFs9Uf006336@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sat Mar 28 15:54:08 2009
New Revision: 190505
URL: http://svn.freebsd.org/changeset/base/190505

Log:
  Do not dereference NULL pointer. refobj is NULL for the objects that are
  preloaded.
  
  Reported and tested by:	ed

Modified:
  head/libexec/rtld-elf/rtld.c

Modified: head/libexec/rtld-elf/rtld.c
==============================================================================
--- head/libexec/rtld-elf/rtld.c	Sat Mar 28 11:29:07 2009	(r190504)
+++ head/libexec/rtld-elf/rtld.c	Sat Mar 28 15:54:08 2009	(r190505)
@@ -1125,7 +1125,7 @@ find_library(const char *xname, const Ob
 	      xname);
 	    return NULL;
 	}
-	if (refobj->z_origin)
+	if (refobj != NULL && refobj->z_origin)
 	    return origin_subst(xname, refobj->origin_path);
 	else
 	    return xstrdup(xname);



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