summaryrefslogtreecommitdiff
path: root/src/core/cs_akick.c
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-10-20 04:34:03 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-10-20 04:34:03 +0000
commit0b3824c86a99354d06339b95e40515de762d65f7 (patch)
tree133edb1fb478a97674cb63e1f89a4762053d24e2 /src/core/cs_akick.c
parent0d3ec454de486da5cbc292f7e694ee8ab7e4fae0 (diff)
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
Diffstat (limited to 'src/core/cs_akick.c')
-rw-r--r--src/core/cs_akick.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/cs_akick.c b/src/core/cs_akick.c
index a9e38fbd2..ede481bcb 100644
--- a/src/core/cs_akick.c
+++ b/src/core/cs_akick.c
@@ -213,10 +213,9 @@ class CommandCSAKick : public Command
if (!na) {
split_usermask(mask, &nick, &user, &host);
- char *smask = new char[strlen(nick) + strlen(user) + strlen(host) + 3];
+ std::string smask = std::string(nick) + "!" + user + "@" + host;
freemask = 1;
- sprintf(smask, "%s!%s@%s", nick, user, host);
- mask = smask;
+ mask = sstrdup(smask.c_str());
delete [] nick;
delete [] user;
delete [] host;