/*
* InspIRCd -- Internet Relay Chat Daemon
*
- * Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
- * Copyright (C) 2008 Craig Edwards <craigedwards@brainbox.cc>
+ * Copyright (C) 2019 Sadie Powell <sadie@witchery.services>
+ * Copyright (C) 2014-2015 Attila Molnar <attilamolnar@hush.com>
+ * Copyright (C) 2012 Robby <robby@chatbelgie.be>
+ * Copyright (C) 2009-2010 Daniel De Graaf <danieldg@inspircd.org>
+ * Copyright (C) 2009 Uli Schlachter <psychon@inspircd.org>
* Copyright (C) 2008 Robin Burchell <robin+git@viroteck.net>
+ * Copyright (C) 2008 Craig Edwards <brain@inspircd.org>
*
* This file is part of InspIRCd. InspIRCd is free software: you can
* redistribute it and/or modify it under the terms of the GNU General Public
/* The caller is trying to match ident@<mask>/bits.
* Chop off the ident@ portion, use match() on it
- * seperately.
+ * separately.
*/
if (match_with_username)
{
}
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);