aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-rs6000.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/coff-rs6000.c')
-rw-r--r--bfd/coff-rs6000.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index 86b4763..c30b360 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -1267,11 +1267,9 @@ _bfd_xcoff_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. */
@@ -1331,11 +1329,9 @@ _bfd_xcoff_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. */