diff options
| author | SChernykh <15806605+SChernykh@users.noreply.github.com> | 2026-05-24 13:58:25 +0200 |
|---|---|---|
| committer | SChernykh <15806605+SChernykh@users.noreply.github.com> | 2026-05-24 13:59:23 +0200 |
| commit | e354264e0c046454dc01f71eeb3fe8098e248ec6 (patch) | |
| tree | 52f09175534cd1246f6531bbcea474914a682268 /src | |
| parent | c3e79d22adb82a25f509877f17398a242e7e8a9d (diff) | |
| download | monzero-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
Diffstat (limited to 'src')
| -rw-r--r-- | src/p2p/net_node.inl | 2 |
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)) |
