aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorCupertino Miranda <cmiranda@synopsys.com>2018-03-02 17:33:48 +0100
committerCupertino Miranda <cmiranda@synopsys.com>2018-10-01 12:42:11 +0100
commitc834917fda58d9e4cd72b67f7793e2f429ccce57 (patch)
tree31e46e7b8962b71e3ba573c93826b8b96f5c09ec /bfd
parent854b8506815f7786b3c82f7824557e7f32a64ac5 (diff)
downloadgdb-c834917fda58d9e4cd72b67f7793e2f429ccce57.zip
gdb-c834917fda58d9e4cd72b67f7793e2f429ccce57.tar.gz
gdb-c834917fda58d9e4cd72b67f7793e2f429ccce57.tar.bz2
[ARC] Improved robustness. Return FALSE in case of NULL pointer.
bfd/ 2018-03-01 Cupertino Miranda <cmiranda@synopsys.com> * elf32-arc.c (elf_arc_finish_dynamic_symbol) Return FALSE in case arc_htab is NULL.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/elf32-arc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index f498668..3f60d09 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -2436,6 +2436,9 @@ elf_arc_finish_dynamic_symbol (bfd * output_bfd,
{
struct elf_arc_link_hash_table *arc_htab = elf_arc_hash_table (info);
+ if (arc_htab == NULL)
+ return FALSE;
+
if (h->dynindx == -1
|| (h->root.type != bfd_link_hash_defined
&& h->root.type != bfd_link_hash_defweak)