summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cidr.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cidr.cpp b/src/cidr.cpp
index 535930026..c7ad9174a 100644
--- a/src/cidr.cpp
+++ b/src/cidr.cpp
@@ -75,6 +75,9 @@ bool irc::sockets::MatchCIDR(const std::string &address, const std::string &cidr
cidr_copy.assign(cidr_mask);
}
+ if (cidr_copy.find('/') == std::string::npos)
+ return false;
+
irc::sockets::sockaddrs addr;
irc::sockets::aptosa(address_copy, 0, addr);
@@ -82,7 +85,6 @@ bool irc::sockets::MatchCIDR(const std::string &address, const std::string &cidr
irc::sockets::cidr_mask mask2(addr, mask.length);
return mask == mask2;
-
}