This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[committed] mach-o: fix uninitialized fields
- From: Tristan Gingold <gingold at adacore dot com>
- To: binutils Development <binutils at sourceware dot org>
- Date: Thu, 18 Aug 2011 11:28:28 +0200
- Subject: [committed] mach-o: fix uninitialized fields
Hi,
this patch initialize two fields in segment command. This bug was detected when objdump is invoked with more that one object file.
Applied on trunk.
Tristan.
bfd/
2011-08-18 Tristan Gingold <gingold@adacore.com>
* mach-o.c (bfd_mach_o_read_segment): Initialize list.
Index: bfd/mach-o.c
===================================================================
RCS file: /cvs/src/src/bfd/mach-o.c,v
retrieving revision 1.65
diff -c -r1.65 mach-o.c
*** bfd/mach-o.c 17 Aug 2011 10:17:39 -0000 1.65
--- bfd/mach-o.c 18 Aug 2011 09:27:54 -0000
***************
*** 2593,2598 ****
--- 2593,2600 ----
seg->nsects = bfd_h_get_32 (abfd, raw.nsects);
seg->flags = bfd_h_get_32 (abfd, raw.flags);
}
+ seg->sect_head = NULL;
+ seg->sect_tail = NULL;
for (i = 0; i < seg->nsects; i++)
{