summaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 28052de98..3e4f995ae 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -304,7 +304,7 @@ chanrec* chanrec::JoinUser(InspIRCd* Instance, userrec *user, const char* cn, bo
MOD_RESULT = 0;
FOREACH_RESULT_I(Instance,I_OnCheckBan,OnCheckBan(user, Ptr));
char mask[MAXBUF];
- sprintf(mask,"%s!%s@%s",user->nick, user->ident, user->GetIPString());
+ snprintf(mask, MAXBUF, "%s!%s@%s",user->nick, user->ident, user->GetIPString());
if (!MOD_RESULT)
{
if (Ptr->IsBanned(user))
@@ -443,7 +443,7 @@ chanrec* chanrec::ForceChan(InspIRCd* Instance, chanrec* Ptr,ucrec *a,userrec* u
bool chanrec::IsBanned(userrec* user)
{
char mask[MAXBUF];
- sprintf(mask,"%s!%s@%s",user->nick, user->ident, user->GetIPString());
+ snprintf(mask, MAXBUF, "%s!%s@%s", user->nick, user->ident, user->GetIPString());
for (BanList::iterator i = this->bans.begin(); i != this->bans.end(); i++)
{
/* This allows CIDR ban matching