[PATCH] D25368: [Object/ELF] - Do not crash on invalid Header->e_shoff value.
Rafael Ávila de Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 7 10:49:48 PDT 2016
rafael accepted this revision.
rafael added a comment.
This revision is now accepted and ready to land.
LGTM with a nit.
================
Comment at: include/llvm/Object/ELF.h:370
"Invalid section header entry size (e_shentsize) in ELF header");
+ if (Header->e_shoff & (AlignOf<typename ELFT::uint>::Alignment - 1))
+ report_fatal_error("Invalid address alignment of section headers");
----------------
Can you use Elf_Shdr instead of uint in AlignOf? After all that is what we return a pointer to.
https://reviews.llvm.org/D25368
More information about the llvm-commits
mailing list