From 12f916450b444427685688bf34de65e11bf849e2 Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Mon, 25 Jan 2021 16:45:06 -0500 Subject: Add ABI version verification for plugins --- examples/breakpoint/src/breakpoint.cpp | 2 ++ examples/triage/triage.cpp | 2 ++ examples/uinotification/uinotification.cpp | 2 ++ examples/x86_extension/src/x86_extension.cpp | 2 ++ 4 files changed, 8 insertions(+) (limited to 'examples') diff --git a/examples/breakpoint/src/breakpoint.cpp b/examples/breakpoint/src/breakpoint.cpp index 4fac98ac..65c8d018 100644 --- a/examples/breakpoint/src/breakpoint.cpp +++ b/examples/breakpoint/src/breakpoint.cpp @@ -25,6 +25,8 @@ void write_breakpoint(BinaryNinja::BinaryView *view, uint64_t start, uint64_t le extern "C" { + BN_DECLARE_CORE_ABI_VERSION + BINARYNINJAPLUGIN bool CorePluginInit() { // Register the plugin with Binary Ninja diff --git a/examples/triage/triage.cpp b/examples/triage/triage.cpp index efd4b80c..5d0dc1d5 100644 --- a/examples/triage/triage.cpp +++ b/examples/triage/triage.cpp @@ -6,6 +6,8 @@ extern "C" { + BN_DECLARE_UI_ABI_VERSION + #ifdef DEMO_VERSION bool TriagePluginInit() #else diff --git a/examples/uinotification/uinotification.cpp b/examples/uinotification/uinotification.cpp index ca53c560..91e9b458 100644 --- a/examples/uinotification/uinotification.cpp +++ b/examples/uinotification/uinotification.cpp @@ -93,6 +93,8 @@ void NotificationListener::OnAddressChange(UIContext* context, ViewFrame* frame, extern "C" { + BN_DECLARE_UI_ABI_VERSION + BINARYNINJAPLUGIN bool UIPluginInit() { NotificationListener::init(); diff --git a/examples/x86_extension/src/x86_extension.cpp b/examples/x86_extension/src/x86_extension.cpp index 87f2c2cb..ada7c801 100644 --- a/examples/x86_extension/src/x86_extension.cpp +++ b/examples/x86_extension/src/x86_extension.cpp @@ -47,6 +47,8 @@ public: extern "C" { + BN_DECLARE_CORE_ABI_VERSION + BINARYNINJAPLUGIN void CorePluginDependencies() { // Make sure we load after the original x86 plugin loads -- cgit v1.3.1