Pass a copy of string to std::regex

This commit is contained in:
ahm3dgg
2026-01-14 06:52:56 +02:00
parent 2146959122
commit d49347627a

View File

@@ -864,7 +864,7 @@ void process_context::build_knowndlls_section_table(registry_manager& registry,
auto known_dll_dep_name_16 = u8_to_u16(known_dll_dep_name_8);
utils::string::to_lower_inplace(known_dll_dep_name_16);
if (std::regex_match(known_dll_dep_name_8.begin(), known_dll_dep_name_8.end(), apiset_pattern))
if (std::regex_match(known_dll_dep_name_8, apiset_pattern))
{
if (auto apiset_entry = apiset.find(known_dll_dep_name_16); apiset_entry != apiset.end())
{