aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-08-18 09:44:11 +0000
committerNick Clifton <nickc@redhat.com>2004-08-18 09:44:11 +0000
commit271d0fc399a1d41cee9d2f34fbb15e18e008a6bb (patch)
treec7a38d4bba971e06d18fab4b8c4eb2ea5394587b /bfd
parente65123b72d901fed332cc9ac00250db9ab1df587 (diff)
downloadgdb-271d0fc399a1d41cee9d2f34fbb15e18e008a6bb.zip
gdb-271d0fc399a1d41cee9d2f34fbb15e18e008a6bb.tar.gz
gdb-271d0fc399a1d41cee9d2f34fbb15e18e008a6bb.tar.bz2
PR 324
(coff_link_add_symbols): Check that the comdat pointer in the coff_section_data structure has been initialised before using it.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/cofflink.c1
2 files changed, 8 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 7c24b39..f9f1126 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2004-08-18 Nick Clifton <nickc@redhat.com>
+
+ PR 324
+ * cofflink.c (coff_link_add_symbols): Check that the comdat
+ pointer in the coff_section_data structure has been initialised
+ before using it.
+
2004-08-18 Alan Modra <amodra@bigpond.net.au>
PR 338
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index 6520669..ca144cc 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -435,6 +435,7 @@ coff_link_add_symbols (bfd *abfd,
if (obj_pe (abfd)
&& (classification == COFF_SYMBOL_GLOBAL
|| classification == COFF_SYMBOL_PE_SECTION)
+ && coff_section_data (abfd, section) != NULL
&& coff_section_data (abfd, section)->comdat != NULL
&& strncmp (name, "??_", 3) == 0
&& strcmp (name, coff_section_data (abfd, section)->comdat->name) == 0)