Bug#196085: Problem in glibc-2.3.2/elf/do-lookup.h
Ognyan Kulev wrote:
This bug is reassigned to libc0.3. The problem seems to be that
glibc-2.3.2/elf/do-lookup.h:do_lookup signals SEGV when SCOPE array is
empty. I don't know the semantics of these data structures, but if it's
allowed this array to be empty, then the attached patch will solve the
problem. (I'm not able to test it right now, but it's so simple...)
Here is the forgotten patch. BTW The crash, that this bug is about,
happens when scope->r_list == NULL (and scope->r_nlist == 0).
Regards
--
Ognyan Kulev <ogi@fmi.uni-sofia.bg>, "\"Programmer\""
7D9F 66E6 68B7 A62B 0FCF EB04 80BF 3A8C A252 9782
2003-06-05 Ognyan Kulev <ogi@fmi.uni-sofia.bg>
* elf/do-lookup.h: Check if SCOPE array is empty.
--- glibc-2.3.2/elf/do-lookup.h.orig 2003-06-05 15:44:26.000000000 +0300
+++ glibc-2.3.2/elf/do-lookup.h 2003-06-05 15:45:00.000000000 +0300
@@ -37,6 +37,9 @@ FCT (const char *undef_name, unsigned lo
size_t n = scope->r_nlist;
struct link_map *map;
+ if (i >= n)
+ return 0;
+
do
{
const ElfW(Sym) *symtab;
Reply to: