[PATCH] D43958: [llvm-readobj][ELF] Move ELF note parsing into lib/Object

Tony Tye via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 12 12:35:26 PDT 2018


t-tye added inline comments.


================
Comment at: include/llvm/Object/ELF.h:173
+    }
+    if (Phdr.p_offset + Phdr.p_filesz > getBufSize()) {
+      Err = createError("invalid program header offset/size");
----------------
Should this return the end iterator if the note section size is 0?

If not the end_iterator should this check that the total size of the note record (including the data of the name and desc) fits in the section? The operator++ does that check.


Repository:
  rL LLVM

https://reviews.llvm.org/D43958





More information about the llvm-commits mailing list