From e7f0a0fb7edf96abbddf72eadb490b5eb22447ec Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 11 Sep 2004 20:10:05 +0000 Subject: Security audit based on RATS output git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@855 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/channels.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/channels.cpp') diff --git a/src/channels.cpp b/src/channels.cpp index 4bec1bcdb..0995a2eaa 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -127,7 +127,7 @@ void chanrec::SetCustomMode(char mode,bool mode_on) m[1] = '\0'; if (!strchr(this->custom_modes,mode)) { - strncat(custom_modes,m,MAXMODES); + strlcat(custom_modes,m,MAXMODES); } log(DEBUG,"Custom mode %c set",mode); } @@ -150,8 +150,8 @@ void chanrec::SetCustomModeParam(char mode,char* parameter,bool mode_on) log(DEBUG,"SetCustomModeParam called"); ModeParameter M; M.mode = mode; - strcpy(M.channel,this->name); - strcpy(M.parameter,parameter); + strlcpy(M.channel,this->name,CHANMAX); + strlcpy(M.parameter,parameter,MAXBUF); if (mode_on) { log(DEBUG,"Custom mode parameter %c %s added",mode,parameter); -- cgit v1.2.3