[llvm-readelf] - Do not crash when the PT_INTERP has a broken offset.
authorGeorgii Rymar <grimar@accesssoftek.com>
Tue, 28 Apr 2020 15:16:00 +0000 (18:16 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Fri, 1 May 2020 15:51:46 +0000 (18:51 +0300)
commit0d54612164519c874eecf5a1be68597b96410628
tree2e2ea05981324c7a6be3971903aa2867b2afccec
parent8c2f4e0e855cd41c412cb1c824960a8adf938b8f
[llvm-readelf] - Do not crash when the PT_INTERP has a broken offset.

We do not verify the p_offset of the PT_INTERP header and tool may
crash when a program interpreter name string goes past the end of the file.

Differential revision: https://reviews.llvm.org/D79013
llvm/test/tools/llvm-readobj/ELF/gnu-phdrs.test
llvm/tools/llvm-readobj/ELFDumper.cpp