[Object, ELF] Fix segmentation fault in ELFFile::getSectionName().
authorAlexey Samsonov <vonosmas@gmail.com>
Thu, 4 Jun 2015 23:40:23 +0000 (23:40 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Thu, 4 Jun 2015 23:40:23 +0000 (23:40 +0000)
commit83f903f3522cad54b020b9d419f331f4e58985de
tree75c06d7e8c2d1c38ad127ed8a1b25af83ca7fbb3
parent22a5d492ef6b37be4ed9a15f0b3f1393617378c9
[Object, ELF] Fix segmentation fault in ELFFile::getSectionName().

Don't do a null dereference if .shstrtab section is missing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239124 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/ELF.h
test/DebugInfo/Inputs/invalid.elf.no-shstrtab [new file with mode: 0644]
test/DebugInfo/dwarfdump-invalid.test