[PATCH] D38512: Added phdr upper bound checks to ElfObject

Parker Thompson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 5 10:51:17 PDT 2017


mothran added a comment.

I updated the diff to correctly use FileCheck with the llvm-objdump output and clang-formated the code in ELF.h.  I don't have commit access so if you could commit on my behalf that would be great.



================
Comment at: include/llvm/Object/ELF.h:147
       return createError("invalid e_phentsize");
+    if (getHeader()->e_phoff + (getHeader()->e_phnum * getHeader()->e_phentsize) > getBufSize())
+      return createError("program headers longer than binary");
----------------
davide wrote:
> is this clang formatted?
Is there a way to cleanly run clang-format across the build to double check for myself?


https://reviews.llvm.org/D38512





More information about the llvm-commits mailing list