From 3c5798123fd6324eb4e8b627fe827251db8cc680 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Mon, 25 Dec 2000 21:41:20 +0000 Subject: [PATCH] * archive.c (coff_write_armap): Don't write more than symbol_count `archive_member_file_ptr's. --- bfd/ChangeLog | 5 +++++ bfd/archive.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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 + + * archive.c (coff_write_armap): Don't write more than symbol_count + `archive_member_file_ptr's. + 2000-12-25 Kazu Hirata * 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++; -- 2.30.2