From 45b222d606213014334f236604075cd55d1399cc Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 3 Aug 2009 23:56:08 +0000 Subject: [PATCH] 2009-08-03 H.J. Lu PR binutils/10363 * elf.c (bfd_elf_string_from_elf_section): Return NULL on invalid string offset. --- bfd/ChangeLog | 6 ++++++ bfd/elf.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 4107449f96a..0dc369547ef 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2009-08-03 H.J. Lu + + PR binutils/10363 + * elf.c (bfd_elf_string_from_elf_section): Return NULL on + invalid string offset. + 2009-08-03 H.J. Lu PR ld/10433 diff --git a/bfd/elf.c b/bfd/elf.c index f27c607ab2b..9863a3a32db 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; -- 2.30.2