# HG changeset patch # User Mike Ruprecht # Date 1244840444 0 # Node ID 55811a205c7112b24e7a028dea1df68f57ba46c3 # Parent 710cb8df1b692c35198a1dde6f147316a53cda8f NULL terminate some strings. Hopefully stop Yahoo texting crashes. Thanks darkrain42 for helping with the solution. diff -r 710cb8df1b69 -r 55811a205c71 libpurple/protocols/yahoo/yahoo.c --- a/libpurple/protocols/yahoo/yahoo.c Thu Jun 11 10:45:39 2009 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Fri Jun 12 21:00:44 2009 +0000 @@ -4172,10 +4172,8 @@ struct yahoo_sms_carrier_cb_data *sms_cb_data; sms_cb_data = g_malloc(sizeof(struct yahoo_sms_carrier_cb_data)); sms_cb_data->gc = gc; - sms_cb_data->who = g_malloc(strlen(who)); - sms_cb_data->what = g_malloc(strlen(what)); - strcpy(sms_cb_data->who, who); - strcpy(sms_cb_data->what, what); + sms_cb_data->who = g_strdup(who); + sms_cb_data->what = g_strdup(what); purple_conversation_write(conv, NULL, "Getting mobile carrier to send the sms", PURPLE_MESSAGE_SYSTEM, time(NULL));