From d51b06572324681277824f3d08a55fb9244def29 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 25 Feb 2024 00:09:06 +0100 Subject: [PATCH] fix: Yara information task not being interruptable --- .../yara_rules/source/content/data_information_sections.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/yara_rules/source/content/data_information_sections.cpp b/plugins/yara_rules/source/content/data_information_sections.cpp index b19a6ccca..91ba76401 100644 --- a/plugins/yara_rules/source/content/data_information_sections.cpp +++ b/plugins/yara_rules/source/content/data_information_sections.cpp @@ -34,6 +34,10 @@ namespace hex::plugin::yara { const std::string fileContent = romfs::get(ruleFilePath).data(); YaraRule yaraRule(fileContent); + task.setInterruptCallback([&yaraRule] { + yaraRule.interrupt(); + }); + const auto result = yaraRule.match(provider, region); if (result.has_value()) { const auto &rules = result.value().matchedRules;