bitlbee/bitlbee-fix_oscar_buffer_overflow.patch

12 lines
572 B
Diff

--- protocols/oscar/ssi.c.orig 2009-10-19 14:34:39.000000000 +0200
+++ protocols/oscar/ssi.c 2009-10-19 14:35:25.000000000 +0200
@@ -414,7 +414,7 @@
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));
+ newgroup = (char*)g_malloc((strlen("Unknown")*sizeof(char)) + 1);
strcpy(newgroup, "Unknown");
aim_ssi_addgroups(sess, conn, &newgroup, 1);
}