git: 7d9e00cd8bd3 - stable/13 - rtld: Fix null-pointer dereference
Konstantin Belousov
kib at FreeBSD.org
Tue Feb 9 04:15:31 UTC 2021
The branch stable/13 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=7d9e00cd8bd317c681b0817b84607182160f5f54
commit 7d9e00cd8bd317c681b0817b84607182160f5f54
Author: David Chisnall <theraven at FreeBSD.org>
AuthorDate: 2021-02-02 14:06:33 +0000
Commit: Konstantin Belousov <kib at FreeBSD.org>
CommitDate: 2021-02-09 04:14:48 +0000
rtld: Fix null-pointer dereference
(cherry picked from commit 43d44842aef3972cc86ce673e84e31f372257b15)
---
libexec/rtld-elf/rtld.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index 7b8bfba84d7d..b186bebbfefc 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -894,8 +894,10 @@ _rtld_bind(Obj_Entry *obj, Elf_Size reloff)
target = (Elf_Addr)(defobj->relocbase + def->st_value);
dbg("\"%s\" in \"%s\" ==> %p in \"%s\"",
- defobj->strtab + def->st_name, basename(obj->path),
- (void *)target, basename(defobj->path));
+ defobj->strtab + def->st_name,
+ obj->path == NULL ? NULL : basename(obj->path),
+ (void *)target,
+ defobj->path == NULL ? NULL : basename(defobj->path));
/*
* Write the new contents for the jmpslot. Note that depending on
More information about the dev-commits-src-all
mailing list