* elf.c (bfd_section_from_shdr <SHT_SYMTAB>): Fail on invalid sh_info.
This commit is contained in:
Alan Modra 2008-11-12 22:04:04 +00:00
parent 09c6f846b6
commit 3337c1e561
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2008-11-13 Alan Modra <amodra@bigpond.net.au>
PR 7023
* elf.c (bfd_section_from_shdr <SHT_SYMTAB>): Fail on invalid sh_info.
2008-11-12 Tristan Gingold <gingold@adacore.com>
* bfd.c (bfd_get_sign_extend_vma): Return 0 for mach-o.

View File

@ -1608,6 +1608,8 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
if (hdr->sh_entsize != bed->s->sizeof_sym)
return FALSE;
if (hdr->sh_info * hdr->sh_entsize > hdr->sh_size)
return FALSE;
BFD_ASSERT (elf_onesymtab (abfd) == 0);
elf_onesymtab (abfd) = shindex;
elf_tdata (abfd)->symtab_hdr = *hdr;