diff options
author | Richard Henderson <rth@redhat.com> | 1998-11-27 17:03:39 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 1998-11-27 17:03:39 +0000 |
commit | 5825dfc52513bdb91e298f7cf7642235644ee65a (patch) | |
tree | 2342dd1831ab221a95e42d4371e3ab06b659199f | |
parent | e1aa8a6373493b56880bfb87d2cb5c18a6b44d8c (diff) | |
download | gdb-5825dfc52513bdb91e298f7cf7642235644ee65a.zip gdb-5825dfc52513bdb91e298f7cf7642235644ee65a.tar.gz gdb-5825dfc52513bdb91e298f7cf7642235644ee65a.tar.bz2 |
* elflink.h (compute_bucket_count): Don't allow minsize==0, it
causes division by zero later on.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elflink.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e6f40de..8e1c3ed 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +Fri Nov 27 17:51:38 1998 Geoff Keating <geoffk@ozemail.com.au> + + * elflink.h (compute_bucket_count): Don't allow minsize==0, it + causes division by zero later on. + Thu Nov 26 11:19:35 1998 Dave Brolley <brolley@cygnus.com> * elf32-fr30.c (fr30_elf_pc9_reloc,fr30_elf_pc12_reloc): Not diff --git a/bfd/elflink.h b/bfd/elflink.h index bbd8339..40f45a0 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -2259,6 +2259,8 @@ compute_bucket_count (info) that the hashing table must at least have NSYMS/4 and at most 2*NSYMS buckets. */ minsize = nsyms / 4; + if (minsize == 0) + minsize = 1; best_size = maxsize = nsyms * 2; /* Create array where we count the collisions in. We must use bfd_malloc |