summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrahn <drahn@openbsd.org>2002-09-01 23:55:01 +0000
committerdrahn <drahn@openbsd.org>2002-09-01 23:55:01 +0000
commit715d8796f4632b8d986ec9a82bf2d96fc5cd930d (patch)
tree52ed73d3333b7f23876c3a634da0f602e89879d9
parentmore appropriate comments about UserDir. (diff)
downloadwireguard-openbsd-715d8796f4632b8d986ec9a82bf2d96fc5cd930d.tar.xz
wireguard-openbsd-715d8796f4632b8d986ec9a82bf2d96fc5cd930d.zip
Make sure that the symbol return value is always initialized before
the address of it is passed to dl_find_symbol(). fixes xpdf lazy binding problem. ok art@
-rw-r--r--libexec/ld.so/alpha/rtld_machine.c3
-rw-r--r--libexec/ld.so/i386/rtld_machine.c1
-rw-r--r--libexec/ld.so/sparc/rtld_machine.c3
-rw-r--r--libexec/ld.so/sparc64/rtld_machine.c3
4 files changed, 7 insertions, 3 deletions
diff --git a/libexec/ld.so/alpha/rtld_machine.c b/libexec/ld.so/alpha/rtld_machine.c
index c6f27d23d93..1e3bfb123ac 100644
--- a/libexec/ld.so/alpha/rtld_machine.c
+++ b/libexec/ld.so/alpha/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.15 2002/08/23 22:57:03 drahn Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.16 2002/09/01 23:55:01 drahn Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -197,6 +197,7 @@ _dl_bind(elf_object_t *object, Elf_Word reloff)
symn = object->dyn.strtab + sym->st_name;
addr = (Elf_Addr *)(object->load_offs + rela->r_offset);
+ this = NULL;
ooff = _dl_find_symbol(symn, _dl_objects, &this,
SYM_SEARCH_ALL|SYM_WARNNOTFOUND|SYM_PLT, sym->st_size);
if (this == NULL) {
diff --git a/libexec/ld.so/i386/rtld_machine.c b/libexec/ld.so/i386/rtld_machine.c
index 48023f6f226..5740973495f 100644
--- a/libexec/ld.so/i386/rtld_machine.c
+++ b/libexec/ld.so/i386/rtld_machine.c
@@ -296,6 +296,7 @@ _dl_bind(elf_object_t *object, int index)
symn = object->dyn.strtab + sym->st_name;
addr = (Elf_Word *)(object->load_offs + rel->r_offset);
+ this = NULL;
ooff = _dl_find_symbol(symn, _dl_objects, &this,
SYM_SEARCH_ALL|SYM_WARNNOTFOUND|SYM_PLT, 0);
if (this == NULL) {
diff --git a/libexec/ld.so/sparc/rtld_machine.c b/libexec/ld.so/sparc/rtld_machine.c
index ab5df51b274..6178d17a90f 100644
--- a/libexec/ld.so/sparc/rtld_machine.c
+++ b/libexec/ld.so/sparc/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.7 2002/08/23 22:57:03 drahn Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.8 2002/09/01 23:55:01 drahn Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -340,6 +340,7 @@ _dl_bind(elf_object_t *object, Elf_Word reloff)
symn = object->dyn.strtab + sym->st_name;
addr = (Elf_Addr *)(object->load_offs + rela->r_offset);
+ this = NULL;
ooff = _dl_find_symbol(symn, _dl_objects, &this,
SYM_SEARCH_ALL|SYM_WARNNOTFOUND|SYM_PLT, 0);
if (this == NULL) {
diff --git a/libexec/ld.so/sparc64/rtld_machine.c b/libexec/ld.so/sparc64/rtld_machine.c
index 054d7c8b701..9a725afa82f 100644
--- a/libexec/ld.so/sparc64/rtld_machine.c
+++ b/libexec/ld.so/sparc64/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.20 2002/08/23 23:29:32 art Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.21 2002/09/01 23:55:01 drahn Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -633,6 +633,7 @@ _dl_bind(elf_object_t *object, int index)
symn = object->dyn.strtab + sym->st_name;
addr = (Elf_Word *)(object->load_offs + rela->r_offset);
+ this = NULL;
ooff = _dl_find_symbol(symn, _dl_objects, &this,
SYM_SEARCH_ALL|SYM_WARNNOTFOUND|SYM_PLT, 0);
if (this == NULL) {