From 21737079251dad4f8153ee4e3df441324839b3e2 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Fri, 23 Feb 2024 20:20:27 +0100 Subject: [PATCH] fix: Building with older libyara versions --- plugins/yara_rules/source/content/yara_rule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/yara_rules/source/content/yara_rule.cpp b/plugins/yara_rules/source/content/yara_rule.cpp index 0b5404310..cc08293d4 100644 --- a/plugins/yara_rules/source/content/yara_rule.cpp +++ b/plugins/yara_rules/source/content/yara_rule.cpp @@ -120,7 +120,7 @@ namespace hex::plugin::yara { &resultContext ); - if (yr_compiler_add_bytes(compiler, m_content.c_str(), m_content.size(), nullptr) != ERROR_SUCCESS) { + if (yr_compiler_add_string(compiler, m_content.c_str(), nullptr) != ERROR_SUCCESS) { std::string errorMessage(0xFFFF, '\x00'); yr_compiler_get_error_message(compiler, errorMessage.data(), errorMessage.size());