[PATCH] D97610: [lld-macho] check minimum header length when opening linkable input files

Thorsten via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 27 13:52:01 PST 2021


tschuett added inline comments.


================
Comment at: lld/MachO/InputFiles.cpp:124
+  if (mbref.getBufferSize() < sizeof(uint32_t)) {
+    error("file is too small to contain a magic number: " + path);
+    return None;
----------------
What are you going to do with. e.g. 4, 5, or 6 bytes files. It only has the magic numbers, but there is no real header?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97610/new/

https://reviews.llvm.org/D97610



More information about the llvm-commits mailing list