37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
$OpenBSD: patch-protocols_oscar_ssi_c,v 1.2 2004/10/21 14:48:51 naddy Exp $
|
|
--- protocols/oscar/ssi.c.orig Wed Sep 22 06:34:44 2004
|
|
+++ protocols/oscar/ssi.c Thu Oct 14 15:43:35 2004
|
|
@@ -45,11 +45,7 @@ static struct aim_ssi_item *aim_ssi_item
|
|
|
|
/* Set the name */
|
|
if (name) {
|
|
- if (!(newitem->name = (char *)g_malloc((strlen(name)+1)*sizeof(char)))) {
|
|
- g_free(newitem);
|
|
- return NULL;
|
|
- }
|
|
- strcpy(newitem->name, name);
|
|
+ newitem->name = g_strdup(name);
|
|
} else
|
|
newitem->name = NULL;
|
|
|
|
@@ -412,9 +408,7 @@ int aim_ssi_cleanlist(aim_session_t *ses
|
|
if (!cur) {
|
|
for (parentgroup=sess->ssi.items; ((parentgroup) && (parentgroup->type!=AIM_SSI_TYPE_GROUP) && (parentgroup->gid==0x0000)); parentgroup=parentgroup->next);
|
|
if (!parentgroup) {
|
|
- char *newgroup;
|
|
- newgroup = (char*)g_malloc(strlen("Unknown")*sizeof(char));
|
|
- strcpy(newgroup, "Unknown");
|
|
+ char *newgroup = g_strdup("Unknown");
|
|
aim_ssi_addgroups(sess, conn, &newgroup, 1);
|
|
}
|
|
}
|
|
@@ -1518,7 +1512,7 @@ int ssi_modfirst(aim_session_t *sess, ai
|
|
mod->toolid = 0x0110;
|
|
mod->toolversion = 0x0629;
|
|
mod->flags = 0;
|
|
- strncpy(mod->name, "ssi", sizeof(mod->name));
|
|
+ strlcpy(mod->name, "ssi", sizeof(mod->name));
|
|
mod->snachandler = snachandler;
|
|
mod->shutdown = ssi_shutdown;
|
|
|