[PATCH] D45579: [WebAssembly] libObject: Don't include the name the size of custom sections

Yury Delendik via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 12 11:39:30 PDT 2018


yurydelendik accepted this revision.
yurydelendik added a comment.
This revision is now accepted and ready to land.

Looks good to me. I would also add error check to ensure that name fits into the section.



================
Comment at: lib/Object/WasmObjectFile.cpp:184
+    Section.Name = readString(Ptr);
+    Size -= Ptr - NameStart;
+  }
----------------
It will be nice to add an error check to see if `Size < Ptr - NameStart`


Repository:
  rL LLVM

https://reviews.llvm.org/D45579





More information about the llvm-commits mailing list