Skip to content

Commit 42886be

Browse files
committed
[RTTI] Fix crash with zeroed base class descriptor
Fixes #6837
1 parent c2f9470 commit 42886be

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

plugins/rtti/microsoft.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,12 @@ std::vector<BaseClassInfo> MicrosoftRTTIProcessor::ProcessClassHierarchyDescript
359359
auto baseClassDesc = BaseClassDescriptor(m_view, baseClassDescAddr);
360360

361361
auto baseClassTypeDescAddr = resolveAddr(baseClassDesc.pTypeDescriptor);
362+
if (baseClassTypeDescAddr == 0)
363+
{
364+
// Fixes issue https://github.com/Vector35/binaryninja-api/issues/6837
365+
m_logger->LogWarn("Skipping BaseClassDescriptor with null pTypeDescriptor %llx", baseClassDescAddr);
366+
continue;
367+
}
362368
auto baseClassTypeDesc = TypeDescriptor(m_view, baseClassTypeDescAddr);
363369
auto baseClassName = DemangleNameMS(m_view, allowMangledClassNames, baseClassTypeDesc.name);
364370
if (!baseClassName.has_value())

0 commit comments

Comments
 (0)