[PATCH] D50387: [WASM] Fix overflow when reading custom section

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 7 07:54:16 PDT 2018


JDevlieghere added inline comments.


================
Comment at: llvm/lib/Object/WasmObjectFile.cpp:222
+    const uint32_t NameLength = Ctx.Ptr - NameStart;
+    if (NameLength > Size)
+      return make_error<StringError>(
----------------
Can this section be empty? (i.e. should I make this greater or equal)


Repository:
  rL LLVM

https://reviews.llvm.org/D50387





More information about the llvm-commits mailing list