svn commit: r190505 - head/libexec/rtld-elf

Konstantin Belousov kib at FreeBSD.org
Sat Mar 28 08:54:10 PDT 2009


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);


More information about the svn-src-head mailing list