diff options
| author | Josh Ferrell <josh@vector35.com> | 2026-04-27 12:21:35 -0400 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2026-04-27 12:21:35 -0400 |
| commit | e616cdea07bcee961d9c2e4b4720836d55d094c5 (patch) | |
| tree | 3133c9550d4da8bb059cd8ea7720bf56066f5d96 /objectivec/objc.cpp | |
| parent | e3bff3341343de7b89bf274c244978cfdc9459be (diff) | |
[Mach-O] Fix crash reading malformed CFString
Diffstat (limited to 'objectivec/objc.cpp')
| -rw-r--r-- | objectivec/objc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/objectivec/objc.cpp b/objectivec/objc.cpp index fb5187ee..3b6a9165 100644 --- a/objectivec/objc.cpp +++ b/objectivec/objc.cpp @@ -1687,7 +1687,7 @@ void ObjCProcessor::ProcessCFStrings() auto data = m_data->ReadBuffer(strLoc, size * 2); str = ""; - for (uint64_t bufferOff = 0; bufferOff < size * 2; bufferOff += 2) + for (uint64_t bufferOff = 0; bufferOff + 1 < data.GetLength(); bufferOff += 2) { uint8_t* rawData = static_cast<uint8_t*>(data.GetData()); uint8_t* offsetAddress = rawData + bufferOff; @@ -1779,7 +1779,7 @@ void ObjCProcessor::ProcessNSConstantArrays() } ScopedSymbolQueue::Get().Process(); } - + } void ObjCProcessor::ProcessNSConstantDictionaries() |
