aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSChernykh <15806605+SChernykh@users.noreply.github.com>2026-05-24 13:58:25 +0200
committerSChernykh <15806605+SChernykh@users.noreply.github.com>2026-05-24 13:59:23 +0200
commite354264e0c046454dc01f71eeb3fe8098e248ec6 (patch)
tree52f09175534cd1246f6531bbcea474914a682268
parentc3e79d22adb82a25f509877f17398a242e7e8a9d (diff)
downloadmonzero-core-e354264e0c046454dc01f71eeb3fe8098e248ec6.tar.gz
monzero-core-e354264e0c046454dc01f71eeb3fe8098e248ec6.tar.xz
monzero-core-e354264e0c046454dc01f71eeb3fe8098e248ec6.zip
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
-rw-r--r--src/p2p/net_node.inl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index 11474aaaa..d1f7e7cdd 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -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))