svn commit: r365655 - stable/11/libexec/rtld-elf

Konstantin Belousov kib at FreeBSD.org
Sat Sep 12 09:47:26 UTC 2020


Author: kib
Date: Sat Sep 12 09:47:25 2020
New Revision: 365655
URL: https://svnweb.freebsd.org/changeset/base/365655

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

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

Modified: stable/11/libexec/rtld-elf/rtld.c
==============================================================================
--- stable/11/libexec/rtld-elf/rtld.c	Sat Sep 12 09:46:14 2020	(r365654)
+++ stable/11/libexec/rtld-elf/rtld.c	Sat Sep 12 09:47:25 2020	(r365655)
@@ -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:


More information about the svn-src-all mailing list