[PATCH] D79853: [llvm-readobj] - --gnu-hash-table: do not crash when the GNU hash table goes past the EOF.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 13 09:44:31 PDT 2020
MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:2681
+ const char *TableData = reinterpret_cast<const char *>(GnuHashTable);
+ assert(TableData >= File.getBufferStart() &&
+ TableData < File.getBufferEnd() &&
----------------
IIRC this is guaranteed by `ELFFile<ELFT>::toMappedAddr`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79853/new/
https://reviews.llvm.org/D79853
More information about the llvm-commits
mailing list