summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2007-07-26 19:06:12 +0000
committerMichael Snyder <msnyder@vmware.com>2007-07-26 19:06:12 +0000
commit9a9ea98ca85cd5bb45ecf97ae7ce6d8022a99d60 (patch)
treed9cec0f4a831eff4a6534f9261889048f548e5e2 /bfd
parent61cf69211448236256f9459824c762b1ced72d12 (diff)
downloadbinutils-redhat-9a9ea98ca85cd5bb45ecf97ae7ce6d8022a99d60.tar.gz
2007-07-26 Michael Snyder <msnyder@access-company.com>
* coffgen.c (fixup_symbol_value): Guard against null; bfd_is_com_section will dereference the section pointer.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog3
-rw-r--r--bfd/coffgen.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 9a2ce289c2..b51de1fcc9 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,8 @@
2007-07-26 Michael Snyder <msnyder@access-company.com>
+ * coffgen.c (fixup_symbol_value): Guard against null;
+ bfd_is_com_section will dereference the section pointer.
+
* syms.c (bfd_decode_symclass): Guard against NULL, since
bfd_is_com_section dereferences the pointer.
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index 7fad78c78f..694625fa0a 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -567,7 +567,8 @@ fixup_symbol_value (bfd *abfd,
struct internal_syment *syment)
{
/* Normalize the symbol flags. */
- if (bfd_is_com_section (coff_symbol_ptr->symbol.section))
+ if (coff_symbol_ptr->symbol.section
+ && bfd_is_com_section (coff_symbol_ptr->symbol.section))
{
/* A common symbol is undefined with a value. */
syment->n_scnum = N_UNDEF;