summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortmm <tmm@FreeBSD.org>2002-09-14 12:14:24 +0000
committertmm <tmm@FreeBSD.org>2002-09-14 12:14:24 +0000
commit208c1cb7671941b62b6619e3c48279948e4f12a4 (patch)
tree790f773b5ef64c358cec44c772b6b19342c33fa9
parent0590c43070aac7fb636a1f4c4b94469046a317a0 (diff)
downloadFreeBSD-src-208c1cb7671941b62b6619e3c48279948e4f12a4.zip
FreeBSD-src-208c1cb7671941b62b6619e3c48279948e4f12a4.tar.gz
Return an error if a symbol is not found in reloc_jmpslots() instead of
crashing.
-rw-r--r--libexec/rtld-elf/sparc64/reloc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libexec/rtld-elf/sparc64/reloc.c b/libexec/rtld-elf/sparc64/reloc.c
index b26b119..7a43ce4 100644
--- a/libexec/rtld-elf/sparc64/reloc.c
+++ b/libexec/rtld-elf/sparc64/reloc.c
@@ -455,6 +455,8 @@ reloc_jmpslots(Obj_Entry *obj)
where = (Elf_Addr *)(obj->relocbase + rela->r_offset);
def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj,
true, NULL);
+ if (def == NULL)
+ return -1;
target = (Elf_Addr)(defobj->relocbase + def->st_value);
reloc_jmpslot(where, target, defobj);
}
OpenPOWER on IntegriCloud