summaryrefslogtreecommitdiff
path: root/bfd/coff-rs6000.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-07-05 09:45:54 +0000
committerJakub Jelinek <jakub@redhat.com>2005-07-05 09:45:54 +0000
commit9ae4d96710636b3020639a327ea94561ca504881 (patch)
tree0a8fab9ef9a3f2bc6b1f9750f4c0fa7ae881a0ad /bfd/coff-rs6000.c
parent365967f96949e571ffc26a2c078bf2c7f629c74a (diff)
downloadbinutils-redhat-9ae4d96710636b3020639a327ea94561ca504881.tar.gz
* libbfd-in.h (struct artdata): Add extended_names_size field.
* libbfd.h: Rebuilt. * coff-rs600.c (_bfd_xcoff_archive_p): Don't clear fields in freshly allocated object by bfd_zalloc. * coff64-rs6000.c (xcoff64_archive_p): Likewise. * ecoff.c (_bfd_ecoff_archive_p): Likewise. * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p): Likewise. (get_extended_arelt_filename): Fail if index is bigger or equal to extended_names_size. (_bfd_generic_read_ar_hdr_mag): Don't set bfd_error_malformed_archive, get_extended_arelt_filename already did that. (_bfd_slurp_extended_name_table): Initialize extended_names_size field. Allocate one extra byte and clear it, in case extended names table is not terminated.
Diffstat (limited to 'bfd/coff-rs6000.c')
-rw-r--r--bfd/coff-rs6000.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index 68162d0e0d..c772e15eb2 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -1294,10 +1294,12 @@ _bfd_xcoff_archive_p (abfd)
if (bfd_ardata (abfd) == (struct artdata *) NULL)
goto error_ret_restore;
- bfd_ardata (abfd)->cache = NULL;
- bfd_ardata (abfd)->archive_head = NULL;
- bfd_ardata (abfd)->symdefs = NULL;
- bfd_ardata (abfd)->extended_names = NULL;
+ /* Cleared by bfd_zalloc above.
+ bfd_ardata (abfd)->cache = NULL;
+ bfd_ardata (abfd)->archive_head = NULL;
+ bfd_ardata (abfd)->symdefs = NULL;
+ bfd_ardata (abfd)->extended_names = NULL;
+ bfd_ardata (abfd)->extended_names_size = 0; */
/* Now handle the two formats. */
if (magic[1] != 'b')