aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-lookup.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-02-20 22:05:45 +0000
committerUlrich Drepper <drepper@redhat.com>1999-02-20 22:05:45 +0000
commit2f6164e233683930e3ef2313efcfc456114fd4da (patch)
tree75ff437ffe8a87f4440ff87cb18d789b5fb8b027 /elf/dl-lookup.c
parenta0e3f6f49caeaba666842f2999b57502437a1111 (diff)
downloadglibc-2f6164e233683930e3ef2313efcfc456114fd4da.zip
glibc-2f6164e233683930e3ef2313efcfc456114fd4da.tar.gz
glibc-2f6164e233683930e3ef2313efcfc456114fd4da.tar.bz2
Update.
* elf/dl-lookup.c (_dl_lookup_symbol_skip): Before first do_lookup call test whether there is any scope left. (_dl_lookup_versioned_symbol_skip): Likewise.
Diffstat (limited to 'elf/dl-lookup.c')
-rw-r--r--elf/dl-lookup.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index dba9243..9a691b7 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -142,8 +142,9 @@ _dl_lookup_symbol_skip (const char *undef_name, const ElfW(Sym) **ref,
for (i = 0; (*scope)->r_duplist[i] != skip_map; ++i)
assert (i < (*scope)->r_nduplist);
- if (! do_lookup (undef_name, hash, *ref, &current_value,
- *scope, i, reference_name, skip_map, 0))
+ if (i >= (*scope)->r_nlist
+ || ! do_lookup (undef_name, hash, *ref, &current_value,
+ *scope, i, reference_name, skip_map, 0))
while (*++scope)
if (do_lookup (undef_name, hash, *ref, &current_value,
*scope, 0, reference_name, skip_map, 0))
@@ -263,8 +264,9 @@ _dl_lookup_versioned_symbol_skip (const char *undef_name,
for (i = 0; (*scope)->r_duplist[i] != skip_map; ++i)
assert (i < (*scope)->r_nduplist);
- if (! do_lookup_versioned (undef_name, hash, *ref, &current_value,
- *scope, i, reference_name, version, skip_map, 0))
+ if (i >= (*scope)->r_nlist
+ || ! do_lookup_versioned (undef_name, hash, *ref, &current_value, *scope,
+ i, reference_name, version, skip_map, 0))
while (*++scope)
if (do_lookup_versioned (undef_name, hash, *ref, &current_value, *scope,
0, reference_name, version, skip_map, 0))