mirror of
https://github.com/wownero/wownero.git
synced 2026-10-26 02:48:33 +01:00
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
This commit is contained in:
@@ -202,8 +202,8 @@ namespace nodetool
|
|||||||
{
|
{
|
||||||
if (now >= it->second)
|
if (now >= it->second)
|
||||||
{
|
{
|
||||||
it = m_blocked_subnets.erase(it);
|
|
||||||
MCLOG_CYAN(el::Level::Info, "global", "Subnet " << it->first.host_str() << " unblocked.");
|
MCLOG_CYAN(el::Level::Info, "global", "Subnet " << it->first.host_str() << " unblocked.");
|
||||||
|
it = m_blocked_subnets.erase(it);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (it->first.matches(ipv4_address))
|
if (it->first.matches(ipv4_address))
|
||||||
|
|||||||
Reference in New Issue
Block a user