diff options
author | Alan Modra <amodra@gmail.com> | 2008-11-12 22:04:04 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2008-11-12 22:04:04 +0000 |
commit | 3337c1e561574b6f203e17c038cb0334666cf27a (patch) | |
tree | 13a752af296a3ce461ea0cc50427802abc16a4f9 /bfd/elf.c | |
parent | 09c6f846b63041b8161c0d4339ac1ddef11ea290 (diff) | |
download | gdb-3337c1e561574b6f203e17c038cb0334666cf27a.zip gdb-3337c1e561574b6f203e17c038cb0334666cf27a.tar.gz gdb-3337c1e561574b6f203e17c038cb0334666cf27a.tar.bz2 |
PR 7023
* elf.c (bfd_section_from_shdr <SHT_SYMTAB>): Fail on invalid sh_info.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r-- | bfd/elf.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |