Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Sep 2020 09:44:50 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r365653 - stable/12/libexec/rtld-elf
Message-ID:  <202009120944.08C9ioQh012370@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sat Sep 12 09:44:50 2020
New Revision: 365653
URL: https://svnweb.freebsd.org/changeset/base/365653

Log:
  MFC r365368:
  rtld: do not process absent dynamic.
  
  PR:	249121

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

Modified: stable/12/libexec/rtld-elf/rtld.c
==============================================================================
--- stable/12/libexec/rtld-elf/rtld.c	Sat Sep 12 07:04:00 2020	(r365652)
+++ stable/12/libexec/rtld-elf/rtld.c	Sat Sep 12 09:44:50 2020	(r365653)
@@ -1066,7 +1066,10 @@ digest_dynamic1(Obj_Entry *obj, int early, const Elf_D
     *dyn_runpath = NULL;
 
     obj->bind_now = false;
-    for (dynp = obj->dynamic;  dynp->d_tag != DT_NULL;  dynp++) {
+    dynp = obj->dynamic;
+    if (dynp == NULL)
+	return;
+    for (;  dynp->d_tag != DT_NULL;  dynp++) {
 	switch (dynp->d_tag) {
 
 	case DT_REL:



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