From owner-svn-src-head@FreeBSD.ORG Sat Mar 28 15:54:09 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64A5F10656ED; Sat, 28 Mar 2009 15:54:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 47C2E8FC20; Sat, 28 Mar 2009 15:54:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2SFs9eT006337; Sat, 28 Mar 2009 15:54:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2SFs9Uf006336; Sat, 28 Mar 2009 15:54:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200903281554.n2SFs9Uf006336@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 28 Mar 2009 15:54:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190505 - head/libexec/rtld-elf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2009 15:54:10 -0000 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);