]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - bfd/elf.c
PR23199, Invalid SHT_GROUP entry leads to group confusion
authorAlan Modra <amodra@gmail.com>
Fri, 18 May 2018 07:39:45 +0000 (17:09 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 18 May 2018 09:02:35 +0000 (18:32 +0930)
commit4bba0fb1c6d391a217c25e44398a7e1c7090155f
treefff53de71569f3b7dd7a12cb1f3de54b043c8ae0
parent8722de9c419c98ce2fb1f294097244c0bc45e030
PR23199, Invalid SHT_GROUP entry leads to group confusion

This patch prevents elf_next_in_group list pointer confusion when
SHT_GROUP sections specify other SHT_GROUP sections in their list of
group sections.

PR 23199
* elf.c (setup_group): Formatting.  Check that SHT_GROUP entries
don't point at other SHT_GROUP sections.  Set shdr corresponding
to invalid entry, to NULL rather than section 0.  Identify
SHT_GROUP section index when reporting an error.  Cope with NULL
shdr pointer.
bfd/ChangeLog
bfd/elf.c