It looks like this crash is fixed by not passing around the address of a
function argument when emitting the signal. Here's a patch that seems to
fix it.
Only in gaim-2.0.0+beta4.new/libgaim/protocols/irc: .irc.c.swp
diff -ur gaim-2.0.0beta4/libgaim/protocols/irc/parse.c gaim-2.0.0+beta4.new/libgaim/protocols/irc/parse.c
--- gaim-2.0.0beta4/libgaim/protocols/irc/parse.c 2006-10-18 13:38:10.000000000 -0400
+++ gaim-2.0.0+beta4.new/libgaim/protocols/irc/parse.c 2006-11-04 10:50:03.000000000 -0500
@@ -529,19 +529,22 @@
return (g_string_free(string, FALSE));
}
-void irc_parse_msg(struct irc_conn *irc, char *input)
+void irc_parse_msg(struct irc_conn *irc, char *buf)
{
struct _irc_msg *msgent;
- char *cur, *end, *tmp, *from, *msgname, *fmt, **args, *msg;
+ char *cur, *end, *tmp, *from, *msgname, *fmt, **args, *msg, *input;
guint i;
irc->recv_time = time(NULL);
+
+ input = g_strdup(buf);
gaim_signal_emit(_irc_plugin, "irc-receiving-text", gaim_account_get_connection(irc->account), &input);
if (!strncmp(input, "PING ", 5)) {
msg = irc_format(irc, "vv", "PONG", input + 5);
irc_send(irc, msg);
g_free(msg);
+ g_free(input);
return;
} else if (!strncmp(input, "ERROR ", 6)) {
if (g_utf8_validate(input, -1, NULL)) {
@@ -550,11 +553,13 @@
g_free(tmp);
} else
gaim_connection_error(gaim_account_get_connection(irc->account), _("Disconnected."));
+ g_free(input);
return;
}
if (input[0] != ':' || (cur = strchr(input, ' ')) == NULL) {
irc_parse_error_cb(irc, input);
+ g_free(input);
return;
}
@@ -572,6 +577,7 @@
irc_msg_default(irc, "", from, &input);
g_free(msgname);
g_free(from);
+ g_free(input);
return;
}
g_free(msgname);
@@ -615,6 +621,7 @@
}
g_free(args);
g_free(from);
+ g_free(input);
}
static void irc_parse_error_cb(struct irc_conn *irc, char *input)
Only in gaim-2.0.0+beta4.new/libgaim/protocols/irc: parse.c~
Only in gaim-2.0.0+beta4.new/libgaim/protocols/irc: .parse.c.swp