soc.2008.yahoo: f8b6e98d: Fix a bug, where malloc failed to alloca...
sulabh at soc.pidgin.im
sulabh at soc.pidgin.im
Fri Aug 22 14:50:31 EDT 2008
-----------------------------------------------------------------
Revision: f8b6e98d7e316ff58d4dc4bd6f376835dbd918ce
Ancestor: b375305cea93bbcd0db8fcc7f728c08b48c11ec8
Author: sulabh at soc.pidgin.im
Date: 2008-08-22T18:48:03
Branch: im.pidgin.soc.2008.yahoo
URL: http://d.pidgin.im/viewmtn/revision/info/f8b6e98d7e316ff58d4dc4bd6f376835dbd918ce
Modified files:
libpurple/protocols/yahoo/yahoo.c
ChangeLog:
Fix a bug, where malloc failed to allocate memory at times, replaced
with g_strdup
-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/yahoo.c b858a0a21420c93f026f32ba703a0a27bc94b547
+++ libpurple/protocols/yahoo/yahoo.c f78ef4a83c46b380f14b317139ad8bf9ff68220e
@@ -2676,8 +2676,7 @@ void yahoo_send_p2p_pkt(PurpleConnection
p2p_data->gc = gc;
p2p_data->host_ip = NULL;
- p2p_data->host_username = (char *)g_malloc(strlen(who));
- strcpy(p2p_data->host_username, who);
+ p2p_data->host_username = g_strdup(who);
p2p_data->val_13 = val_13;
p2p_data->connection_type = YAHOO_P2P_WE_ARE_SERVER;
More information about the Commits
mailing list