diff options
author | Andreas Schwab <schwab@redhat.com> | 2009-07-28 09:21:54 +0200 |
---|---|---|
committer | Andreas Schwab <schwab@redhat.com> | 2009-07-28 09:21:54 +0200 |
commit | b14f097d7ef032db746b885ec05b167e54b8fa9c (patch) | |
tree | ec0cb2d8a2de784ed9d709ecdf9cc82dd1815fe1 /elf/dl-lookup.c | |
parent | e1214916e74fa6aa7984cb78e68c38d49e5834a6 (diff) | |
parent | e73e694e38b7b222eec3ec5897eb507d88bb8928 (diff) |
Merge commit 'origin/master' into fedora/master
Diffstat (limited to 'elf/dl-lookup.c')
-rw-r--r-- | elf/dl-lookup.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c index 18f728812e..1d68d67a35 100644 --- a/elf/dl-lookup.c +++ b/elf/dl-lookup.c @@ -377,10 +377,10 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash, idx -= size; } - if (size * 3 <= tab->n_elements) + if (size * 3 <= tab->n_elements * 4) { /* Expand the table. */ - size_t newsize = _dl_higher_prime_number (size); + size_t newsize = _dl_higher_prime_number (size + 1); struct unique_sym *newentries = calloc (sizeof (struct unique_sym), newsize); if (newentries == NULL) @@ -398,6 +398,7 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash, tab->free (entries); tab->size = newsize; + size = newsize; entries = tab->entries = newentries; tab->free = free; } |