From e5fee00d89c53a27013596fc6b21f69e92822a0a Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 13 Nov 2012 22:54:21 +0000 Subject: Allocate elf_segment_map with bfd_zalloc * elf.c (rewrite_elf_program_header): Allocate elf_segment_map with bfd_zalloc, instead of bfd_alloc. --- bfd/ChangeLog | 5 +++++ bfd/elf.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e18411e50..971723757 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2012-11-13 Joe Seymour + + * elf.c (rewrite_elf_program_header): Allocate elf_segment_map + with bfd_zalloc, instead of bfd_alloc. + 2012-11-09 Nick Clifton * Makefile.am (ALL_MACHINES): Add cpu-v850-rh850.lo. diff --git a/bfd/elf.c b/bfd/elf.c index f40e81bbd..b8bb6d3f9 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -6043,7 +6043,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd) and carry on looping. */ amt = sizeof (struct elf_segment_map); amt += ((bfd_size_type) section_count - 1) * sizeof (asection *); - map = (struct elf_segment_map *) bfd_alloc (obfd, amt); + map = (struct elf_segment_map *) bfd_zalloc (obfd, amt); if (map == NULL) { free (sections); -- cgit v1.2.3