From 07fffb0b905cbf8e09d2235162ff3680cac12a2d Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 25 Feb 2012 15:10:52 -0500 Subject: Bug #1380 - Do not allow akill masks to end in @. This can be used to cause the IRCd to SQUIT us by adding invalid akills. The only known affected is Charybdis. Also fixed a crash caused by receiving a SQUIT for ourselves. --- src/operserv.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/operserv.c') diff --git a/src/operserv.c b/src/operserv.c index 6e2e7ce33..74a2377dc 100644 --- a/src/operserv.c +++ b/src/operserv.c @@ -809,6 +809,14 @@ int add_akill(User * u, char *mask, const char *by, const time_t expires, *host = 0; host++; + if (!*host) + { + if (u) + notice_lang(s_OperServ, u, BAD_USERHOST_MASK); + free(mask2); + return -1; + } + entry = scalloc(sizeof(Akill), 1); if (!entry) { -- cgit