]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2007-07-26 Michael Snyder <msnyder@access-company.com>
authorMichael Snyder <msnyder@vmware.com>
Thu, 26 Jul 2007 19:06:12 +0000 (19:06 +0000)
committerMichael Snyder <msnyder@vmware.com>
Thu, 26 Jul 2007 19:06:12 +0000 (19:06 +0000)
* coffgen.c (fixup_symbol_value): Guard against null;
bfd_is_com_section will dereference the section pointer.

bfd/ChangeLog
bfd/coffgen.c

index 9a2ce289c2a78244747f41868f26fd23136bc16e..b51de1fcc9c7465bb88b4d7604221ddc1967e6ef 100644 (file)
@@ -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.
 
index 7fad78c78f38723b70f8f14fa3370da3449ab6b3..694625fa0a8d68d2c9910276872cf009953e6544 100644 (file)
@@ -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;