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;