diff options
| author | Alexander Barton <alex@barton.de> | 2002-12-26 16:25:43 +0000 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2002-12-26 16:25:43 +0000 |
| commit | 0ced4181b032249a5ccab2a6ae1d61bf08f60293 (patch) | |
| tree | a026bc6e5fac9d1c64d28e0e4b0216a7330ee209 /src/ngircd/irc-server.c | |
| parent | 4f6f84e7e1bc015e201e8a79e13b0906dcb23ec1 (diff) | |
| download | ngircd-0ced4181b032249a5ccab2a6ae1d61bf08f60293.tar.gz ngircd-0ced4181b032249a5ccab2a6ae1d61bf08f60293.zip | |
- replaced all strncpy()'s and strncat()'s with strlcpy() and strlcat().
Diffstat (limited to 'src/ngircd/irc-server.c')
| -rw-r--r-- | src/ngircd/irc-server.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ngircd/irc-server.c b/src/ngircd/irc-server.c index e5846dd4..0be66783 100644 --- a/src/ngircd/irc-server.c +++ b/src/ngircd/irc-server.c @@ -14,7 +14,7 @@ #include "portab.h" -static char UNUSED id[] = "$Id: irc-server.c,v 1.24 2002/12/12 12:24:18 alex Exp $"; +static char UNUSED id[] = "$Id: irc-server.c,v 1.25 2002/12/26 16:25:43 alex Exp $"; #include "imp.h" #include <assert.h> @@ -284,8 +284,7 @@ IRC_NJOIN( CLIENT *Client, REQUEST *Req ) /* Falsche Anzahl Parameter? */ if( Req->argc != 2 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command ); - strncpy( str, Req->argv[1], COMMAND_LEN - 1 ); - str[COMMAND_LEN - 1] = '\0'; + strlcpy( str, Req->argv[1], sizeof( str )); channame = Req->argv[0]; ptr = strtok( str, "," ); |