aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff64-rs6000.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/coff64-rs6000.c')
-rw-r--r--bfd/coff64-rs6000.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index d39fe4c..bb54623 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -1940,11 +1940,9 @@ xcoff64_slurp_armap (bfd *abfd)
}
/* Read in the entire symbol table. */
- contents = (bfd_byte *) bfd_alloc (abfd, sz + 1);
+ contents = (bfd_byte *) _bfd_alloc_and_read (abfd, sz + 1, sz);
if (contents == NULL)
return FALSE;
- if (bfd_bread (contents, sz, abfd) != sz)
- return FALSE;
/* Ensure strings are NULL terminated so we don't wander off the end
of the buffer. */