Fixed dangling iterator in is_remote_host_allowed

- m_blocked_subnets.erase(it) either moves it to the next entry, or sets it to m_blocked_subnets.end() in which case the MCLOG_CYAN will access invalid data

(cherry picked from commit e354264e0c046454dc01f71eeb3fe8098e248ec6)
This commit is contained in:
SChernykh
2026-10-04 18:50:20 -04:00
committed by such-gitea
parent f8052081f3
commit d5bbcefc87
+1 -1
View File
@@ -206,8 +206,8 @@ namespace nodetool
{
if (now >= it->second)
{
it = m_blocked_subnets.erase(it);
MCLOG_CYAN(el::Level::Info, "global", "Subnet " << it->first.host_str() << " unblocked.");
it = m_blocked_subnets.erase(it);
continue;
}
if (it->first.matches(ipv4_address))