Commit Diff


commit - 33927ee8546bb5e74839718ee00ee657e33830ad
commit + 84efd5e969d045326f154132cbd5960290e1093d
blob - 2a4bf3f3222191ae21fd3256a4b03516be6c7e1f
blob + 383aa78c1cf1986555284d93a29181f50099932f
--- src/ngircd/client.c
+++ src/ngircd/client.c
@@ -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 */
 
blob - b5e879c6b85adc2adc7539d585acfb0aa6ec4446
blob + e3cd6396c1b4c1d94f8454e392175d32fb7ccb82
--- src/ngircd/irc-mode.c
+++ src/ngircd/irc-mode.c
@@ -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 *Or
 		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 *Or
 			{
 				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 );
 	}