aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2009-08-03 23:56:08 +0000
committerH.J. Lu <hjl.tools@gmail.com>2009-08-03 23:56:08 +0000
commit45b222d606213014334f236604075cd55d1399cc (patch)
tree78da3f7068802fcc7d9f25e9afc3a60aa0d20bd4
parent1ffa32eed68b02c79dfc3b5b113344ef62df7b83 (diff)
downloadgdb-45b222d606213014334f236604075cd55d1399cc.zip
gdb-45b222d606213014334f236604075cd55d1399cc.tar.gz
gdb-45b222d606213014334f236604075cd55d1399cc.tar.bz2
2009-08-03 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/10363 * elf.c (bfd_elf_string_from_elf_section): Return NULL on invalid string offset.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 4107449..0dc3695 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,11 @@
2009-08-03 H.J. Lu <hongjiu.lu@intel.com>
+ PR binutils/10363
+ * elf.c (bfd_elf_string_from_elf_section): Return NULL on
+ invalid string offset.
+
+2009-08-03 H.J. Lu <hongjiu.lu@intel.com>
+
PR ld/10433
* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Set got
to htab->init_got_offset and plt to htab->init_plt_offset
diff --git a/bfd/elf.c b/bfd/elf.c
index f27c607..9863a3a 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -331,7 +331,7 @@ bfd_elf_string_from_elf_section (bfd *abfd,
(shindex == shstrndx && strindex == hdr->sh_name
? ".shstrtab"
: bfd_elf_string_from_elf_section (abfd, shstrndx, hdr->sh_name)));
- return "";
+ return NULL;
}
return ((char *) hdr->contents) + strindex;