OSDN Git Service

Added phdr upper bound checks to ElfObject.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 5 Oct 2017 20:01:32 +0000 (20:01 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 5 Oct 2017 20:01:32 +0000 (20:01 +0000)
commit629b8be51be2ebbf91ad9a4f6e42c8e0202db271
tree11f4ff1b1b4b41f16033ac86a2540472617dffe7
parentad31280af50c8337af0d39645dd6e259b659d2bf
Added phdr upper bound checks to ElfObject.

Ensure the program_headers call will fail correctly if the program
headers are larger than the underlying buffer.

Patch by Parker Thompson!

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