diff options
author | Adam <Adam@anope.org> | 2012-02-25 15:10:52 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-02-25 15:10:52 -0500 |
commit | 07fffb0b905cbf8e09d2235162ff3680cac12a2d (patch) | |
tree | 7b964c1abfba3aeb0d6aaf6698c1fdd0d52f819a /src/operserv.c | |
parent | 1d3ca36768a013e1a28a1e3db1b4ad9f47fc2157 (diff) |
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.
Diffstat (limited to 'src/operserv.c')
-rw-r--r-- | src/operserv.c | 8 |
1 files changed, 8 insertions, 0 deletions
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) { |