pidgin: c5f97143: Fix a crash when the user isn't in your ...
datallah at pidgin.im
datallah at pidgin.im
Tue Jul 29 15:01:19 EDT 2008
-----------------------------------------------------------------
Revision: c5f971433ffb3d76c1e30e850f921576ecd4ea87
Ancestor: 26095209492eae7f4532cb9b0cb4fdc9dfaac9e8
Author: datallah at pidgin.im
Date: 2008-07-29T18:55:03
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/c5f971433ffb3d76c1e30e850f921576ecd4ea87
Modified files:
libpurple/protocols/msn/msn.c
ChangeLog:
Fix a crash when the user isn't in your list.
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/msn.c d71a9dfa8d95d62426e5698bb2dfbcb685062bf2
+++ libpurple/protocols/msn/msn.c d11acc540bbc70d3952ecbe1dec864a578f0fe0f
@@ -583,9 +583,7 @@ msn_can_receive_file(PurpleConnection *g
msn_can_receive_file(PurpleConnection *gc, const char *who)
{
PurpleAccount *account;
- char *normal;
- MsnSession *session;
- MsnUser *user;
+ gchar *normal;
gboolean ret;
account = purple_connection_get_account(gc);
@@ -595,9 +593,10 @@ msn_can_receive_file(PurpleConnection *g
g_free(normal);
if (ret) {
- session = gc->proto_data;
- user = msn_userlist_find_user(session->userlist, who);
- ret = (user->clientid & MSN_CLIENT_CAP_WEBMSGR) == 0;
+ MsnSession *session = gc->proto_data;
+ MsnUser *user = msn_userlist_find_user(session->userlist, who);
+ if (user)
+ ret = (user->clientid & MSN_CLIENT_CAP_WEBMSGR) == 0;
/* Include these too: MSN_CLIENT_CAP_MSNMOBILE|MSN_CLIENT_CAP_MSNDIRECT ? */
}
@@ -1352,6 +1351,7 @@ fake_userlist_add_buddy(MsnUserList *use
if (group_id >= 0)
{
+ /* This is wrong... user->group_ids contains g_strdup()'d data now */
user->group_ids = g_list_append(user->group_ids,
GINT_TO_POINTER(group_id));
}
More information about the Commits
mailing list