Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EionRobb/pidgin-opensteamworks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreionrobb <eionrobb@8ca6c67d-4297-256d-f884-781da6d5760b>2011-11-22 23:46:23 +0400
committereionrobb <eionrobb@8ca6c67d-4297-256d-f884-781da6d5760b>2011-11-22 23:46:23 +0400
commita5f464cb5366f993663e554c6f50bd5e76ba63fe (patch)
tree4d35e6a72044a12f26f5c15e8d0cffa99fe6beb0 /libsteamworks.cpp
parentb473476f01d1c75be14b5ff71bd7cdd985840a8c (diff)
Fix for potentially returning free'd memory when working out the game name from its id
Diffstat (limited to 'libsteamworks.cpp')
-rwxr-xr-xlibsteamworks.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/libsteamworks.cpp b/libsteamworks.cpp
index 79b635b..dbb610c 100755
--- a/libsteamworks.cpp
+++ b/libsteamworks.cpp
@@ -218,6 +218,7 @@ steamworks_gameid_to_gamename(SteamInfo *steam, guint64 gameid)
if (steam->apps->GetAppData((AppId_t) gameid, "name", name, 256))
return name;
g_free(name);
+ name = NULL;
}
if (!appinfo)
@@ -231,6 +232,8 @@ steamworks_gameid_to_gamename(SteamInfo *steam, guint64 gameid)
if (!success)
return NULL;
}
+
+ purple_debug_info("steam", "Searching appinfo.vdf\n");
// Find:
// \1gameid\0(id)\0
@@ -375,7 +378,7 @@ steamworks_eventloop(gpointer userdata)
const gchar *alias = steam->friends->GetFriendPersonaName(friendadd->m_ulSteamID);
if (!buddy)
{
- buddy = purple_buddy_new(pc->account, username, alias);
+ buddy = purple_buddy_new(pc->account, username, NULL);
purple_blist_add_buddy(buddy, NULL, purple_find_group("Steam"), NULL);
}
serv_got_alias(pc, username, alias);
@@ -1018,14 +1021,14 @@ steamworks_login(PurpleAccount *account)
buddy = purple_find_buddy(account, id);
if (!buddy)
{
- buddy = purple_buddy_new(account, id, alias);
+ buddy = purple_buddy_new(account, id, NULL);
purple_blist_add_buddy(buddy, NULL, group, NULL);
}
serv_got_alias(pc, id, alias);
buddy->proto_data = &steamID;
EPersonaState state = steam->friends->GetFriendPersonaState(steamID);
- purple_debug_info("steam", "Friend state %d ", state);
+ purple_debug_info("steam", "Friend state %d\n", state);
const gchar *status_id = steamworks_personastate_to_statustype(state);
purple_debug_info("steam", "status_id %s\n", status_id);
purple_prpl_got_user_status(account, id, status_id, NULL);