From c0ef307ab4241257ec86ece0351bf1604cb8f232 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Fri, 16 May 2025 14:12:10 +0200 Subject: Fix crash with invalid vtable info when processing MSVC vftables Found when a vtable is constrained to a size less than the base vft, indicating a bad base vft associating most likely. Fixes https://github.com/Vector35/binaryninja-api/issues/6840 --- plugins/rtti/microsoft.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/rtti') diff --git a/plugins/rtti/microsoft.cpp b/plugins/rtti/microsoft.cpp index 9e26194a..b1b549a8 100644 --- a/plugins/rtti/microsoft.cpp +++ b/plugins/rtti/microsoft.cpp @@ -790,8 +790,8 @@ void MicrosoftRTTIProcessor::ProcessVFT() } vftFinished.insert(vftAddr); - auto vftInfo = ProcessVFT(vftAddr, classInfo, baseClassInfo); - classInfo.vft = vftInfo.value(); + if (auto vftInfo = ProcessVFT(vftAddr, classInfo, baseClassInfo)) + classInfo.vft = vftInfo.value(); }; size_t processedNum = 0; -- cgit v1.3.1