comparison libpurple/protocols/yahoo/yahoo.c @ 27189:55811a205c71

NULL terminate some strings. Hopefully stop Yahoo texting crashes. Thanks darkrain42 for helping with the solution.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Fri, 12 Jun 2009 21:00:44 +0000
parents 48bf7a893709
children 510f07e1f5c1 0200eaa7acc3
comparison
equal deleted inserted replaced
27182:710cb8df1b69 27189:55811a205c71
4170 carrier = g_hash_table_lookup(yd->sms_carrier, who); 4170 carrier = g_hash_table_lookup(yd->sms_carrier, who);
4171 if (!carrier) { 4171 if (!carrier) {
4172 struct yahoo_sms_carrier_cb_data *sms_cb_data; 4172 struct yahoo_sms_carrier_cb_data *sms_cb_data;
4173 sms_cb_data = g_malloc(sizeof(struct yahoo_sms_carrier_cb_data)); 4173 sms_cb_data = g_malloc(sizeof(struct yahoo_sms_carrier_cb_data));
4174 sms_cb_data->gc = gc; 4174 sms_cb_data->gc = gc;
4175 sms_cb_data->who = g_malloc(strlen(who)); 4175 sms_cb_data->who = g_strdup(who);
4176 sms_cb_data->what = g_malloc(strlen(what)); 4176 sms_cb_data->what = g_strdup(what);
4177 strcpy(sms_cb_data->who, who);
4178 strcpy(sms_cb_data->what, what);
4179 4177
4180 purple_conversation_write(conv, NULL, "Getting mobile carrier to send the sms", PURPLE_MESSAGE_SYSTEM, time(NULL)); 4178 purple_conversation_write(conv, NULL, "Getting mobile carrier to send the sms", PURPLE_MESSAGE_SYSTEM, time(NULL));
4181 4179
4182 yahoo_get_sms_carrier(gc, sms_cb_data); 4180 yahoo_get_sms_carrier(gc, sms_cb_data);
4183 4181