diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2000-12-25 21:41:20 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2000-12-25 21:41:20 +0000 |
commit | 264be7e3e2bbec36760cd7e66fde9aa240b0755c (patch) | |
tree | 2247b8b87657c44064f8c53e878d0a72608477ec | |
parent | 1ae888d8e577e6d8aa1fac2c3497b77599b21b60 (diff) | |
download | gdb-264be7e3e2bbec36760cd7e66fde9aa240b0755c.tar.gz |
* archive.c (coff_write_armap): Don't write more than symbol_count
`archive_member_file_ptr's.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/archive.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index bc44020f47c..9c1f097cc1a 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2000-12-25 Alexandre Oliva <aoliva@redhat.com> + + * archive.c (coff_write_armap): Don't write more than symbol_count + `archive_member_file_ptr's. + 2000-12-25 Kazu Hirata <kazu@hxi.com> * vms-tir.c: Fix formatting. diff --git a/bfd/archive.c b/bfd/archive.c index 1321073f482..14dc7700729 100644 --- a/bfd/archive.c +++ b/bfd/archive.c @@ -2198,7 +2198,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx) /* For each symbol which is used defined in this object, write out the object file's address in the archive. */ - while (((bfd *) (map[count]).pos) == current) + while (count < symbol_count && ((bfd *) (map[count]).pos) == current) { bfd_write_bigendian_4byte_int (arch, archive_member_file_ptr); count++; |