about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2002-10-04 12:39:58 +0000
committerAlexander Barton <alex@barton.de>2002-10-04 12:39:58 +0000
commit467e76aa3296be5a811d53887d5caa41f827aaa8 (patch)
tree7b46331b52c22f25fcdf4f8c7ab4e167eff21dda
parent63bda7de11bdf4875923757d0987f25f5c05c76c (diff)
downloadngircd-467e76aa3296be5a811d53887d5caa41f827aaa8.tar.gz
ngircd-467e76aa3296be5a811d53887d5caa41f827aaa8.zip
- der Puffer fuer das Prefix war zu klein.
-rw-r--r--src/ngircd/client.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ngircd/client.c b/src/ngircd/client.c
index f8ab6511..cc664140 100644
--- a/src/ngircd/client.c
+++ b/src/ngircd/client.c
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: client.c,v 1.60 2002/09/03 18:54:31 alex Exp $
+ * $Id: client.c,v 1.61 2002/10/04 12:39:58 alex Exp $
  *
  * client.c: Management aller Clients
  *
@@ -53,8 +53,11 @@
 #include <exp.h>
 
 
+#define GETID_LEN (CLIENT_NICK_LEN-1) + 1 + (CLIENT_USER_LEN-1) + 1 + (CLIENT_HOST_LEN-1) + 1
+
+
 LOCAL CLIENT *This_Server, *My_Clients;
-LOCAL CHAR GetID_Buffer[CLIENT_ID_LEN];
+LOCAL CHAR GetID_Buffer[GETID_LEN];
 
 
 LOCAL INT Count PARAMS(( CLIENT_TYPE Type ));
@@ -713,7 +716,7 @@ Client_Mask( CLIENT *Client )
 	
 	if( Client->type == CLIENT_SERVER ) return Client->id;
 
-	sprintf( GetID_Buffer, "%s!%s@%s", Client->id, Client->user, Client->host );
+	snprintf( GetID_Buffer, GETID_LEN, "%s!%s@%s", Client->id, Client->user, Client->host );
 	return GetID_Buffer;
 } /* Client_Mask */