mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 23:39:35 +08:00
(bfd_section_from_shdr): Add sanity check when parsing dynamic sections.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2005-05-17 Tavis Ormandy <taviso@gentoo.org>
|
||||||
|
|
||||||
|
* elf.c (bfd_section_from_shdr): Add sanity check when parsing
|
||||||
|
dynamic sections.
|
||||||
|
|
||||||
2005-05-17 Alan Modra <amodra@bigpond.net.au>
|
2005-05-17 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* elf32-ppc.c (LIS_11. LIS_12): Define.
|
* elf32-ppc.c (LIS_11. LIS_12): Define.
|
||||||
|
@ -1768,6 +1768,9 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
|
|||||||
case SHT_DYNAMIC: /* Dynamic linking information. */
|
case SHT_DYNAMIC: /* Dynamic linking information. */
|
||||||
if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
|
if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
if (hdr->sh_link > elf_numsections (abfd)
|
||||||
|
|| elf_elfsections (abfd)[hdr->sh_link] == NULL)
|
||||||
|
return FALSE;
|
||||||
if (elf_elfsections (abfd)[hdr->sh_link]->sh_type != SHT_STRTAB)
|
if (elf_elfsections (abfd)[hdr->sh_link]->sh_type != SHT_STRTAB)
|
||||||
{
|
{
|
||||||
Elf_Internal_Shdr *dynsymhdr;
|
Elf_Internal_Shdr *dynsymhdr;
|
||||||
|
Reference in New Issue
Block a user