From a4823075e583c15cd568402ce5b8cc1dbf8b044b Mon Sep 17 00:00:00 2001 From: Thomas Moestl Date: Sat, 14 Sep 2002 12:14:24 +0000 Subject: [PATCH] Return an error if a symbol is not found in reloc_jmpslots() instead of crashing. --- libexec/rtld-elf/sparc64/reloc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libexec/rtld-elf/sparc64/reloc.c b/libexec/rtld-elf/sparc64/reloc.c index b26b119bb7d3..7a43ce401d11 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); }