(elf_dynamic_do_rel): Avoid overflow in computation to skip relative
authordrepper <drepper>
Sat, 29 Jun 2002 16:59:11 +0000 (16:59 +0000)
committerdrepper <drepper>
Sat, 29 Jun 2002 16:59:11 +0000 (16:59 +0000)
relocations.

elf/do-rel.h

index 7f3b06a..bad1025 100644 (file)
@@ -70,7 +70,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