[PATCH] D77006: [lld-macho] Support reading of universal binaries
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 31 14:53:22 PDT 2020
smeenai added inline comments.
================
Comment at: lld/MachO/InputFiles.cpp:90
+
+ for (uint32_t i = 0, n = read32be(&hdr->nfat_arch); i < n; ++i) {
+ if (read32be(&arch[i].cputype) != target->cpuType ||
----------------
We may wanna add some bounds checking here to handle malformed fat files, e.g. if nfat_arch is an absurdly large value and we go over bounds. Idk if yaml2obj is capable of generating a malformed fat file of that sort, but we should at least have some checks.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77006/new/
https://reviews.llvm.org/D77006
More information about the llvm-commits
mailing list