[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/modules/aim-toc aim-toc.c,1.30,1.31
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/modules/aim-toc aim-toc.c,1.30,1.31 |
Date: |
Tue, 25 Mar 2003 18:29:27 -0500 |
Update of /cvsroot/ayttm/ayttm/modules/aim-toc
In directory subversions:/tmp/cvs-serv17844/modules/aim-toc
Modified Files:
aim-toc.c
Log Message:
strcpy/strncpy, strcat/strncat, sprintf/snprintf
Index: aim-toc.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/aim-toc/aim-toc.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- aim-toc.c 25 Mar 2003 02:13:30 -0000 1.30
+++ aim-toc.c 25 Mar 2003 23:29:25 -0000 1.31
@@ -280,7 +280,7 @@
eb_debug(DBG_TOC, "Match found, copying id!!");
- strcpy( ecr->id, id );
+ strncpy( ecr->id, id , sizeof(ecr->id));
eb_join_chat_room(ecr);
}
@@ -380,8 +380,8 @@
{
eb_chat_room * chat_room = g_new0(eb_chat_room, 1);
eb_local_account * ela = aim_find_local_account_by_conn(conn);
- strcpy(chat_room->id, id);
- strcpy(chat_room->room_name, name);
+ strncpy(chat_room->id, id, sizeof(chat_room->id));
+ strncpy(chat_room->room_name, name, sizeof(chat_room->room_name));
chat_room->connected = FALSE;
chat_room->fellows = NULL;
chat_room->protocol_local_chat_room_data = NULL; /* not needed for AIM
*/
@@ -647,7 +647,7 @@
{
eb_chat_room * ecr = g_new0(eb_chat_room, 1);
- strcpy( ecr->room_name, name );
+ strncpy( ecr->room_name, name , sizeof(ecr->room_name));
ecr->fellows = NULL;
ecr->connected = FALSE;
ecr->local_user = account;
@@ -842,7 +842,8 @@
char * c = NULL;
char buff[1024];
struct eb_aim_local_account_data * ala = g_new0(struct
eb_aim_local_account_data, 1);
- strcpy(ala->aim_info, "Visit the Ayttm website at <a
href=\"http://www.nongnu.org/ayttm/\">www.nongnu.org/ayttm</a>");
+ strncpy(ala->aim_info, "Visit the Ayttm website at <a
href=\"http://www.nongnu.org/ayttm/\">www.nongnu.org/ayttm</a>",
+ sizeof(ala->aim_info));
eb_debug(DBG_TOC, "eb_aim_read_local_config: entering\n");
@@ -1157,12 +1158,12 @@
c = value_pair_get_value(values, "server");
if(c)
{
- strcpy(aim_server, c);
+ strncpy(aim_server, c, sizeof(aim_server));
}
c = value_pair_get_value(values, "port");
if(c)
{
- strcpy(aim_port, c);
+ strncpy(aim_port, c, sizeof(aim_port));
}
c = value_pair_get_value(values, "do_aim_debug");
if(c)
@@ -1178,7 +1179,7 @@
config = value_pair_add(config, "server", aim_server);
config = value_pair_add(config, "port", aim_port);
- sprintf(buffer, "%d", do_aim_debug);
+ snprintf(buffer, 5, "%d", do_aim_debug);
config = value_pair_add(config, "do_aim_debug", buffer);
return config;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/modules/aim-toc aim-toc.c,1.30,1.31,
Colin Leroy <address@hidden> <=