summaryrefslogtreecommitdiff
path: root/rust/src/lib.rs
diff options
context:
space:
mode:
authorRusty Wagner <rusty.wagner@gmail.com>2023-01-24 18:38:13 -0700
committerRusty Wagner <rusty.wagner@gmail.com>2023-01-30 11:57:43 -0500
commita3939bdec15f9299ae9a681255fa93c47113870a (patch)
tree2b4bb5643ac3cd25a618a99a542968fe81c66bcc /rust/src/lib.rs
parentcf4220570c2d1b7105fb29719383f64026d46837 (diff)
Fix UAF on C++ BinaryView plugin init, improve demangler and BinaryView APIs
Diffstat (limited to 'rust/src/lib.rs')
-rw-r--r--rust/src/lib.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/rust/src/lib.rs b/rust/src/lib.rs
index 5fbb8239..57b71cba 100644
--- a/rust/src/lib.rs
+++ b/rust/src/lib.rs
@@ -528,6 +528,22 @@ pub fn plugin_ui_abi_minimum_version() -> u32 {
binaryninjacore_sys::BN_MINIMUM_UI_ABI_VERSION
}
+pub fn add_required_plugin_dependency<S: string::BnStrCompatible>(name: S) {
+ unsafe {
+ binaryninjacore_sys::BNAddRequiredPluginDependency(
+ name.into_bytes_with_nul().as_ref().as_ptr() as *const std::os::raw::c_char,
+ )
+ };
+}
+
+pub fn add_optional_plugin_dependency<S: string::BnStrCompatible>(name: S) {
+ unsafe {
+ binaryninjacore_sys::BNAddOptionalPluginDependency(
+ name.into_bytes_with_nul().as_ref().as_ptr() as *const std::os::raw::c_char,
+ )
+ };
+}
+
// Provide ABI version automatically so that the core can verify binary compatibility
#[no_mangle]
#[allow(non_snake_case)]