PR24689, string table corruption
authorAlan Modra <amodra@gmail.com>
Fri, 21 Jun 2019 02:21:38 +0000 (11:51 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 21 Jun 2019 02:34:41 +0000 (12:04 +0930)
commit890f750a3b053532a4b839a2dd6243076de12031
tree8624ddef090b9615f9d160f9d7cb3e1b2d3a96dc
parent2a81e61405262fd0299a5079b29ce417a8edba0c
PR24689, string table corruption

The testcase in the PR had a e_shstrndx section of type SHT_GROUP.
hdr->contents were initialized by setup_group rather than being read
from the file, thus last byte was not zero and string dereference ran
off the end of the buffer.

PR 24689
* elfcode.h (elf_object_p): Check type of e_shstrndx section.
bfd/ChangeLog
bfd/elfcode.h