[Lldb-commits] [lldb] [lldb][Mach-O] Bounds-check GetArchitectureAtIndex against m_fat_archs (PR #205289)
Yao Qi via lldb-commits
lldb-commits at lists.llvm.org
Wed Jun 24 00:46:24 PDT 2026
================
@@ -142,7 +142,9 @@ size_t ObjectContainerUniversalMachO::GetNumArchitectures() const {
bool ObjectContainerUniversalMachO::GetArchitectureAtIndex(
uint32_t idx, ArchSpec &arch) const {
- if (idx < m_header.nfat_arch) {
+ // guard against m_fat_archs.size() to keep this safe regardless of
+ // how the header was populated.
----------------
qiyao wrote:
I removed the comments in the new commit.
https://github.com/llvm/llvm-project/pull/205289
More information about the lldb-commits
mailing list