From ec25118d4b47b64a5b8c890a5e3cbd3f82c93b6c Mon Sep 17 00:00:00 2001 From: dfr Date: Wed, 31 Dec 2003 15:10:41 +0000 Subject: Initialise some uninitialised variables. Thanks to: valgrind --- libexec/rtld-elf/rtld.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index ddd1800..73568d6 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -514,6 +514,7 @@ digest_dynamic(Obj_Entry *obj, int early) const Elf_Dyn *dyn_rpath = NULL; int plttype = DT_REL; + obj->bind_now = false; for (dynp = obj->dynamic; dynp->d_tag != DT_NULL; dynp++) { switch (dynp->d_tag) { @@ -991,6 +992,7 @@ init_rtld(caddr_t mapbase) * The "path" member can't be initialized yet because string constatns * cannot yet be acessed. Below we will set it correctly. */ + memset(&objtmp, 0, sizeof(objtmp)); objtmp.path = NULL; objtmp.rtld = true; objtmp.mapbase = mapbase; -- cgit v1.1