From 368407b09eba7c5d09689ac81eaadd1645820edd Mon Sep 17 00:00:00 2001 From: Alexander Khosrowshahi Date: Mon, 2 Jun 2025 17:35:28 -0400 Subject: Fix calls to BNFreeString in kernel cache API Amends calls to BNFreeString in kernel cache API that were causing `get_macho_header_for_address`, `get_macho_header_for_image`, `get_image_name_for_address`, and `get_name_for_address` to fail. Fixes https://github.com/Vector35/binaryninja-api/issues/6855 --- view/kernelcache/api/kernelcacheapi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'view/kernelcache/api/kernelcacheapi.h') diff --git a/view/kernelcache/api/kernelcacheapi.h b/view/kernelcache/api/kernelcacheapi.h index a4462cb0..35c53d78 100644 --- a/view/kernelcache/api/kernelcacheapi.h +++ b/view/kernelcache/api/kernelcacheapi.h @@ -254,7 +254,7 @@ namespace KernelCacheAPI { static BNKCViewLoadProgress GetLoadProgress(Ref view); static uint64_t FastGetImageCount(Ref view); - bool LoadImageWithInstallName(std::string installName); + bool LoadImageWithInstallName(const std::string& installName); bool LoadImageContainingAddress(uint64_t addr); std::vector GetAvailableImages(); @@ -268,7 +268,7 @@ namespace KernelCacheAPI { std::vector GetImages(); std::vector GetLoadedImages(); - std::optional GetMachOHeaderForImage(std::string name); + std::optional GetMachOHeaderForImage(const std::string& name); std::optional GetMachOHeaderForAddress(uint64_t address); }; } \ No newline at end of file -- cgit v1.3.1