]> arthur.barton.de Git - ngircd-alex.git/commitdiff
- Removed strl[cat|cpy]() function calls ...
authorAlexander Barton <alex@barton.de>
Wed, 8 Jan 2003 23:13:45 +0000 (23:13 +0000)
committerAlexander Barton <alex@barton.de>
Wed, 8 Jan 2003 23:13:45 +0000 (23:13 +0000)
src/ngircd/client.c
src/ngircd/irc-mode.c

index 2a4bf3f3222191ae21fd3256a4b03516be6c7e1f..383aa78c1cf1986555284d93a29181f50099932f 100644 (file)
@@ -17,7 +17,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: client.c,v 1.65.2.2 2003/01/08 23:09:04 alex Exp $";
+static char UNUSED id[] = "$Id: client.c,v 1.65.2.3 2003/01/08 23:13:45 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -399,7 +399,8 @@ Client_SetAway( CLIENT *Client, CHAR *Txt )
        assert( Client != NULL );
        assert( Txt != NULL );
 
-       strlcpy( Client->away, Txt, sizeof( Client->away ));
+       strncpy( Client->away, Txt, CLIENT_AWAY_LEN - 1 );
+       Client->away[CLIENT_AWAY_LEN - 1] = '\0';
        Log( LOG_DEBUG, "User \"%s\" is away: %s", Client_Mask( Client ), Txt );
 } /* Client_SetAway */
 
index b5e879c6b85adc2adc7539d585acfb0aa6ec4446..e3cd6396c1b4c1d94f8454e392175d32fb7ccb82 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: irc-mode.c,v 1.24.2.2 2003/01/08 23:08:12 alex Exp $";
+static char UNUSED id[] = "$Id: irc-mode.c,v 1.24.2.3 2003/01/08 23:13:45 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -252,7 +252,7 @@ Channel_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel )
                if( ! Channel_IsMemberOf( Channel, Origin )) return IRC_WriteStrClient( Origin, RPL_CHANNELMODEIS_MSG, Client_ID( Origin ), Channel_Name( Channel ), Channel_Modes( Channel ));
 
                /* The sender is a member: generate extended reply */
-               strlcpy( the_modes, Channel_Modes( Channel ), sizeof( the_modes ));
+               strcpy( the_modes, Channel_Modes( Channel ));
                mode_ptr = the_modes;
                strcpy( the_args, "" );
                while( *mode_ptr )
@@ -261,16 +261,16 @@ Channel_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel )
                        {
                                case 'l':
                                        snprintf( argadd, sizeof( argadd ), " %ld", Channel_MaxUsers( Channel ));
-                                       strlcat( the_args, argadd, sizeof( the_args ));
+                                       strcat( the_args, argadd );
                                        break;
                                case 'k':
-                                       strlcat( the_args, " ", sizeof( the_args ));
-                                       strlcat( the_args, Channel_Key( Channel ), sizeof( the_args ));
+                                       strcat( the_args, " " );
+                                       strcat( the_args, Channel_Key( Channel ));
                                        break;
                        }
                        mode_ptr++;
                }
-               if( the_args[0] ) strlcat( the_modes, the_args, sizeof( the_modes ));
+               if( the_args[0] ) strcat( the_modes, the_args );
 
                return IRC_WriteStrClient( Origin, RPL_CHANNELMODEIS_MSG, Client_ID( Origin ), Channel_Name( Channel ), the_modes );
        }