aboutsummaryrefslogtreecommitdiff
path: root/src/banman.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2020-10-12 15:35:08 -0700
committerPieter Wuille <pieter@wuille.net>2020-10-12 15:35:08 -0700
commit886be97af5d4aba338b23a7b20b8560be8156231 (patch)
treeccc1c69bdee6c79b398c1e031e81d48a2b54a89a /src/banman.cpp
parent883cea7dea3cedc9b45b6191f7d4e7be2d9a11ca (diff)
Ignore incorrectly-serialized banlist.dat entries
Diffstat (limited to 'src/banman.cpp')
-rw-r--r--src/banman.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/banman.cpp b/src/banman.cpp
index 8752185a60..995fef3d07 100644
--- a/src/banman.cpp
+++ b/src/banman.cpp
@@ -184,7 +184,7 @@ void BanMan::SweepBanned()
while (it != m_banned.end()) {
CSubNet sub_net = (*it).first;
CBanEntry ban_entry = (*it).second;
- if (now > ban_entry.nBanUntil) {
+ if (!sub_net.IsValid() || now > ban_entry.nBanUntil) {
m_banned.erase(it++);
m_is_dirty = true;
notify_ui = true;