2000-05-08 Jakub Jelinek <jakub@redhat.com>
authorAndreas Jaeger <aj@suse.de>
Mon, 8 May 2000 12:59:12 +0000 (12:59 +0000)
committerAndreas Jaeger <aj@suse.de>
Mon, 8 May 2000 12:59:12 +0000 (12:59 +0000)
* elf/dl-lookup.c (add_dependency): Reallocate l_reldeps in
sizeof(struct link_map *) chunks, not in bytes.

elf/dl-lookup.c

index c38e2e8..c4eb8a6 100644 (file)
@@ -137,7 +137,8 @@ add_dependency (struct link_map *undef_map, struct link_map *map)
 
                  undef_map->l_reldepsmax += 5;
                  newp = realloc (undef_map->l_reldeps,
-                                 undef_map->l_reldepsmax);
+                                 undef_map->l_reldepsmax
+                                 * sizeof(struct link_map *));
 
                  if (__builtin_expect (newp != NULL, 1))
                    undef_map->l_reldeps = (struct link_map **) newp;