diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-09-11 20:10:05 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-09-11 20:10:05 +0000 |
commit | e7f0a0fb7edf96abbddf72eadb490b5eb22447ec (patch) | |
tree | 67c9bfeadf64d1622e8ed060a55969ddb6452834 /src/channels.cpp | |
parent | ea36f2bb1b8b1bf03b8615672866f93697caff75 (diff) |
Security audit based on RATS output
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@855 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/channels.cpp')
-rw-r--r-- | src/channels.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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); |