From 0b3824c86a99354d06339b95e40515de762d65f7 Mon Sep 17 00:00:00 2001 From: cyberbotx Date: Tue, 20 Oct 2009 04:34:03 +0000 Subject: Apply some changes based on possible "flaws" found with flawfinder. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2574 5417fbe8-f217-4b02-8779-1006273d7864 --- src/core/os_chankill.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/os_chankill.c') diff --git a/src/core/os_chankill.c b/src/core/os_chankill.c index 42d9d061b..6eb9e9456 100644 --- a/src/core/os_chankill.c +++ b/src/core/os_chankill.c @@ -74,8 +74,8 @@ class CommandOSChanKill : public Command cunext = cu->next; if (is_oper(cu->user)) continue; - strncpy(mask, "*@", 3); /* Use *@" for the akill's, */ - strncat(mask, cu->user->host, HOSTMAX); + strlcpy(mask, "*@", sizeof(mask)); /* Use *@" for the akill's, */ + strlcat(mask, cu->user->host, sizeof(mask)); add_akill(NULL, mask, s_OperServ, expires, realreason); check_akill(cu->user->nick, cu->user->GetIdent().c_str(), cu->user->host, NULL, NULL); } -- cgit