mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 13:56:22 +08:00
Fix assertion failure in the BFD library when called to parse a file containing corrupt ELF group information.
PR 25699 * elf.c (bfd_elf_set_group_contents): Replace assertion with an error return.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2020-03-19 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR 25699
|
||||||
|
* elf.c (bfd_elf_set_group_contents): Replace assertion with an
|
||||||
|
error return.
|
||||||
|
|
||||||
2020-03-19 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
2020-03-19 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||||
|
|
||||||
* elfxx-riscv.c (riscv_parse_subset): Don't use C99.
|
* elfxx-riscv.c (riscv_parse_subset): Don't use C99.
|
||||||
|
@ -3533,8 +3533,13 @@ bfd_elf_set_group_contents (bfd *abfd, asection *sec, void *failedptrarg)
|
|||||||
if (symindx == 0)
|
if (symindx == 0)
|
||||||
{
|
{
|
||||||
/* If called from the assembler, swap_out_syms will have set up
|
/* If called from the assembler, swap_out_syms will have set up
|
||||||
elf_section_syms. */
|
elf_section_syms.
|
||||||
BFD_ASSERT (elf_section_syms (abfd) != NULL);
|
PR 25699: A corrupt input file could contain bogus group info. */
|
||||||
|
if (elf_section_syms (abfd) == NULL)
|
||||||
|
{
|
||||||
|
*failedptr = TRUE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
symindx = elf_section_syms (abfd)[sec->index]->udata.i;
|
symindx = elf_section_syms (abfd)[sec->index]->udata.i;
|
||||||
}
|
}
|
||||||
elf_section_data (sec)->this_hdr.sh_info = symindx;
|
elf_section_data (sec)->this_hdr.sh_info = symindx;
|
||||||
|
Reference in New Issue
Block a user