From: Ulrich Drepper Date: Sat, 29 Jun 2002 17:00:24 +0000 (+0000) Subject: (elf_dynamic_do_rel): Avoid overflow in computation to skip relative X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c713c92cf8fba03be0008a27054da93624973546;p=thirdparty%2Fglibc.git (elf_dynamic_do_rel): Avoid overflow in computation to skip relative relocations. --- diff --git a/elf/do-rel.h b/elf/do-rel.h index 8b9bdf2da75..42df96945bd 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