Skip to content

Commit 7c953db

Browse files
Merge pull request #9706 from adrian-prantl/cherry-pick-swift-release-6.1-lldb-Fix-off-by-one-in-array-index-check-in-Objective-C-runtime-plugin-118995
[Cherry-pick into swift/release/6.1] [lldb] Fix off by one in array index check in Objective C runtime plugin (llvm#118995)
2 parents 31fd2df + 35c17c1 commit 7c953db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3291,7 +3291,7 @@ bool AppleObjCRuntimeV2::NonPointerISACache::EvaluateNonPointerISA(
32913291
}
32923292

32933293
// If the index is still out of range then this isn't a pointer.
3294-
if (index > m_indexed_isa_cache.size())
3294+
if (index >= m_indexed_isa_cache.size())
32953295
return false;
32963296

32973297
LLDB_LOGF(log, "AOCRT::NPI Evaluate(ret_isa = 0x%" PRIx64 ")",

0 commit comments

Comments
 (0)