summaryrefslogtreecommitdiff
path: root/objectivec/objc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'objectivec/objc.cpp')
-rw-r--r--objectivec/objc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/objectivec/objc.cpp b/objectivec/objc.cpp
index 1b53a366..72f07c9c 100644
--- a/objectivec/objc.cpp
+++ b/objectivec/objc.cpp
@@ -1693,9 +1693,9 @@ void ObjCProcessor::ProcessCFStrings()
{
reader->Seek(i + ptrSize);
uint64_t flags = reader->ReadPointer();
- auto strLoc = ReadPointerAccountingForRelocations(reader.get());
- auto size = reader->ReadPointer();
- if (size > cfstrings->GetEnd() || reader->GetOffset() > cfstrings->GetEnd() - size)
+ const auto strLoc = ReadPointerAccountingForRelocations(reader.get());
+ const auto size = reader->ReadPointer();
+ if (!m_data->IsValidOffset(strLoc + size))
{
m_logger->LogWarn("CFString at 0x%llx has invalid size 0x%llx, skipping...", i, size);
continue;