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

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 12 12:04:47 PDT 2018


sbc100 added inline comments.


================
Comment at: lib/Object/WasmObjectFile.cpp:184
+    Section.Name = readString(Ptr);
+    Size -= Ptr - NameStart;
+  }
----------------
yurydelendik wrote:
> It will be nice to add an error check to see if `Size < Ptr - NameStart`
I generaly we don't yes handle that kind of malformedness gracefully.   Probably we could want to change all the uses of Ptr (such as the argument to readString) to contain the end ptr too.   That is probably separate change.


Repository:
  rL LLVM

https://reviews.llvm.org/D45579





More information about the llvm-commits mailing list