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 9a2ce28..b51de1f 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 7fad78c..694625f 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;