Fixes invalid NT header check in variant

Ensures the NT header signature check uses a capture to avoid potential issues with variable scope.
This commit is contained in:
2025-10-27 09:22:00 +03:00
parent 9be7ca886d
commit 4d9e055bb3

View File

@@ -233,7 +233,8 @@ namespace
constexpr bool invalid_nt_header_file(const NtHeaderVariant& variant)
{
constexpr std::uint32_t nt_hdr_magic = 0x4550;
return std::visit([](const auto& header) -> bool { return header.signature != nt_hdr_magic; }, variant);
return std::visit([&nt_hdr_magic](const auto& header) -> bool { return header.signature != nt_hdr_magic; },
variant);
}
struct ExtractedSection