From 8ef4a64be527a85aa0aca5253abcf5c1f14b3770 Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Wed, 2 Jul 2025 08:31:11 -0400 Subject: Fix Objective-C dynamic dispatch setting. --- plugins/workflow_objc/Workflow.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'plugins/workflow_objc/Workflow.cpp') diff --git a/plugins/workflow_objc/Workflow.cpp b/plugins/workflow_objc/Workflow.cpp index 3be2a042..c0c90427 100644 --- a/plugins/workflow_objc/Workflow.cpp +++ b/plugins/workflow_objc/Workflow.cpp @@ -82,7 +82,8 @@ std::vector generateArgumentNames(const std::vector& c bool Workflow::rewriteMethodCall(LLILFunctionRef ssa, size_t insnIndex) { - const auto bv = ssa->GetFunction()->GetView(); + auto function = ssa->GetFunction(); + const auto bv = function->GetView(); const auto llil = ssa->GetNonSSAForm(); const auto insn = ssa->GetInstruction(insnIndex); const auto params = insn.GetParameterExprs(); @@ -143,10 +144,10 @@ bool Workflow::rewriteMethodCall(LLILFunctionRef ssa, size_t insnIndex) } auto funcType = BinaryNinja::Type::FunctionType(retType, cc, callTypeParams); - ssa->GetFunction()->SetAutoCallTypeAdjustment(ssa->GetFunction()->GetArchitecture(), insn.address, {funcType, BN_DEFAULT_CONFIDENCE}); + function->SetAutoCallTypeAdjustment(function->GetArchitecture(), insn.address, {funcType, BN_DEFAULT_CONFIDENCE}); // -- - if (!BinaryNinja::Settings::Instance()->Get("core.function.objectiveC.rewriteMessageSendTarget", bv)) + if (!BinaryNinja::Settings::Instance()->Get("analysis.objectiveC.resolveDynamicDispatch", function)) return false; // Check the analysis info for a selector reference corresponding to the -- cgit v1.3.1