inspircd

A modular C++ IRC daemon (ircd). https://www.inspircd.org/
Log | Files | Refs | README

commit 8bc996bcc1444b33ccfde6ca3588deee0a0459d1
parent 755a32c75101c4df0e5699db558785fc0dbc1973
Author: Peter Powell <petpow@saberuk.com>
Date:   Mon, 18 Feb 2019 15:43:22 +0000

Fix MatchCIDR matching UNIX socket hostnames.

Diffstat:
Msrc/cidr.cpp | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/cidr.cpp b/src/cidr.cpp @@ -73,7 +73,11 @@ bool irc::sockets::MatchCIDR(const std::string &address, const std::string &cidr } irc::sockets::sockaddrs addr; - irc::sockets::aptosa(address_copy, 0, addr); + if (!irc::sockets::aptosa(address_copy, 0, addr)) + { + // The address could not be parsed. + return false; + } irc::sockets::cidr_mask mask(cidr_copy); irc::sockets::cidr_mask mask2(addr, mask.length);