aboutsummaryrefslogtreecommitdiff
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
commitac38308c9515c590cf3e80d10259bdcb4eef135f (patch)
tree63d245c9754006b7522f326164d4fc17ea2a8552 /bfd
parentc82a7c57dfaf9b0d9adc288d997515e04be8efb8 (diff)
downloadgdb-ac38308c9515c590cf3e80d10259bdcb4eef135f.zip
gdb-ac38308c9515c590cf3e80d10259bdcb4eef135f.tar.gz
gdb-ac38308c9515c590cf3e80d10259bdcb4eef135f.tar.bz2
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 9a2ce28..b51de1f 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 7fad78c..694625f 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;