aboutsummaryrefslogtreecommitdiff
path: root/bfd/archive.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2000-12-25 21:41:20 +0000
committerAlexandre Oliva <aoliva@redhat.com>2000-12-25 21:41:20 +0000
commit3c5798123fd6324eb4e8b627fe827251db8cc680 (patch)
treef20f3ce411a2670ca7b59d1966c2965efb2729cc /bfd/archive.c
parent672579e99bf1a11960157a0443bb481bc16525b6 (diff)
downloadgdb-3c5798123fd6324eb4e8b627fe827251db8cc680.zip
gdb-3c5798123fd6324eb4e8b627fe827251db8cc680.tar.gz
gdb-3c5798123fd6324eb4e8b627fe827251db8cc680.tar.bz2
* archive.c (coff_write_armap): Don't write more than symbol_count
`archive_member_file_ptr's.
Diffstat (limited to 'bfd/archive.c')
-rw-r--r--bfd/archive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/archive.c b/bfd/archive.c
index 1321073..14dc770 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++;