Fix loading of YARA rules on Windows (#6893)

Make the relative filepath check cross-platform.

Fixes #6788
This commit is contained in:
Zach Wasserman 2021-01-11 07:32:31 -08:00 committed by GitHub
parent 8fd470ca92
commit c93fefb7f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -212,7 +212,7 @@ Status handleRuleFiles(const std::string& category,
YR_RULES* tmp_rules = nullptr;
std::string rule = item.GetString();
if (rule[0] != '/') {
if (boost::filesystem::path(rule).is_relative()) {
rule = kYARAHome + rule;
}