[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/modules/icq-toc icq-toc.c,1.15,1.16
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/modules/icq-toc icq-toc.c,1.15,1.16 |
Date: |
Tue, 25 Mar 2003 18:29:27 -0500 |
Update of /cvsroot/ayttm/ayttm/modules/icq-toc
In directory subversions:/tmp/cvs-serv17844/modules/icq-toc
Modified Files:
icq-toc.c
Log Message:
strcpy/strncpy, strcat/strncat, sprintf/snprintf
Index: icq-toc.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/icq-toc/icq-toc.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- icq-toc.c 25 Mar 2003 21:54:13 -0000 1.15
+++ icq-toc.c 25 Mar 2003 23:29:25 -0000 1.16
@@ -281,7 +281,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);
}
@@ -381,8 +381,8 @@
{
eb_chat_room * chat_room = g_new0(eb_chat_room, 1);
eb_local_account * ela = icq_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 icq
*/
@@ -648,7 +648,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;
@@ -839,7 +839,8 @@
char * c = NULL;
char buff[1024];
struct eb_icq_local_account_data * ala = g_new0(struct
eb_icq_local_account_data, 1);
- strcpy(ala->icq_info, "Visit the Ayttm website at <a
href=\"http://www.nongnu.org/ayttm/\">www.nongnu.org/ayttm</a>");
+ strncpy(ala->icq_info, "Visit the Ayttm website at <a
href=\"http://www.nongnu.org/ayttm/\">www.nongnu.org/ayttm</a>",
+ sizeof(ala->icq_info));
eb_debug(DBG_TOC, "eb_icq_read_local_config: entering\n");
@@ -1154,12 +1155,12 @@
c = value_pair_get_value(values, "server");
if(c)
{
- strcpy(icq_server, c);
+ strncpy(icq_server, c, sizeof(icq_server));
}
c = value_pair_get_value(values, "port");
if(c)
{
- strcpy(icq_port, c);
+ strncpy(icq_port, c, sizeof(icq_port));
}
c = value_pair_get_value(values, "do_icq_debug");
if(c)
@@ -1175,7 +1176,7 @@
config = value_pair_add(config, "server", icq_server);
config = value_pair_add(config, "port", icq_port);
- sprintf(buffer, "%d", do_icq_debug);
+ snprintf(buffer, 5, "%d", do_icq_debug);
config = value_pair_add(config, "do_icq_debug", buffer);
return config;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/modules/icq-toc icq-toc.c,1.15,1.16,
Colin Leroy <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.430,1.431 configure.in,1.427,1.428
- Next by Date:
[Ayttm-commits] CVS: ayttm/modules/aim-toc aim-toc.c,1.30,1.31
- Previous by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.430,1.431 configure.in,1.427,1.428
- Next by thread:
[Ayttm-commits] CVS: ayttm/modules/aim-toc aim-toc.c,1.30,1.31
- Index(es):