[PATCH] D99389: [lld-macho] Implement -segprot
Vy Nguyen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 29 10:09:05 PDT 2021
oontvoo accepted this revision.
oontvoo added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lld/MachO/Driver.cpp:997-999
+ StringRef segName = arg->getValue(0);
+ uint32_t maxProt = parseProtection(arg->getValue(1));
+ uint32_t initProt = parseProtection(arg->getValue(2));
----------------
Maybe I'm being paranoid - but should you check NumValues() to ensure they're 3 (and ignore the option if it's not) to avoid index-out-of-bounds?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99389/new/
https://reviews.llvm.org/D99389
More information about the llvm-commits
mailing list