diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-06-29 17:00:24 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-06-29 17:00:24 +0000 |
commit | c713c92cf8fba03be0008a27054da93624973546 (patch) | |
tree | 362de2d390a5fad82ec133cf6d9b19bfe205b4f5 /elf | |
parent | 087db3f9143aa826083197c1795f3ff0d1c42b30 (diff) | |
download | glibc-c713c92cf8fba03be0008a27054da93624973546.tar.gz glibc-c713c92cf8fba03be0008a27054da93624973546.tar.xz glibc-c713c92cf8fba03be0008a27054da93624973546.zip |
(elf_dynamic_do_rel): Avoid overflow in computation to skip relative
relocations.
Diffstat (limited to 'elf')
-rw-r--r-- | elf/do-rel.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/elf/do-rel.h b/elf/do-rel.h index 8b9bdf2da7..42df96945b 100644 --- a/elf/do-rel.h +++ b/elf/do-rel.h @@ -66,7 +66,7 @@ elf_dynamic_do_rel (struct link_map *map, ElfW(Word) nrelative = (map->l_info[RELCOUNT_IDX] == NULL ? 0 : map->l_info[RELCOUNT_IDX]->d_un.d_val); const ElfW(Rel) *relative = r; - r = MIN (r + nrelative, end); + r = r + MIN (nrelative, relsize / sizeof (ElfW(Rel))); #ifndef RTLD_BOOTSTRAP /* This is defined in rtld.c, but nowhere in the static libc.a; make |