From 17ca87fc69f554aecc4a7f8d6d354a6ad9bec7be Mon Sep 17 00:00:00 2001 From: Maks Naumov Date: Fri, 11 Jul 2014 23:55:30 +0930 Subject: [PATCH] Fix typo in _bfd_elf_strtab_add PR 17141 * elf.c (_bfd_elf_strtab_add): Check strtab name for failure. --- bfd/ChangeLog | 5 +++++ bfd/elf.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 1a84fc5ea84..6b081f92db0 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2014-07-11 Maks Naumov + + PR 17141 + * elf.c (_bfd_elf_strtab_add): Check strtab name for failure. + 2014-07-08 Nick Clifton PR ld/17110 diff --git a/bfd/elf.c b/bfd/elf.c index 3f377d1e9d0..9dc6b6d121f 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -5298,7 +5298,7 @@ prep_headers (bfd *abfd) elf_tdata (abfd)->shstrtab_hdr.sh_name = (unsigned int) _bfd_elf_strtab_add (shstrtab, ".shstrtab", FALSE); if (elf_tdata (abfd)->symtab_hdr.sh_name == (unsigned int) -1 - || elf_tdata (abfd)->symtab_hdr.sh_name == (unsigned int) -1 + || elf_tdata (abfd)->strtab_hdr.sh_name == (unsigned int) -1 || elf_tdata (abfd)->shstrtab_hdr.sh_name == (unsigned int) -1) return FALSE; -- 2.30.2