From: Michael Snyder Date: Thu, 26 Jul 2007 21:53:35 +0000 (+0000) Subject: 2007-07-26 Michael Snyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2d4f3e92ff96c19987e2e0f79f698604f578adb8;p=binutils-gdb.git 2007-07-26 Michael Snyder * linker.c (already_linked_newfunc): Check for NULL return from bfd_hash_allocate. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index b51de1fcc9c..538436d4bb5 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,8 @@ 2007-07-26 Michael Snyder + * linker.c (already_linked_newfunc): Check for NULL return from + bfd_hash_allocate. + * coffgen.c (fixup_symbol_value): Guard against null; bfd_is_com_section will dereference the section pointer. diff --git a/bfd/linker.c b/bfd/linker.c index f547a752a16..d31752be373 100644 --- a/bfd/linker.c +++ b/bfd/linker.c @@ -2948,6 +2948,9 @@ already_linked_newfunc (struct bfd_hash_entry *entry ATTRIBUTE_UNUSED, ret->entry = NULL; + if (ret == NULL) + return ret; + return &ret->root; }