Mercurial > pidgin.yaz
diff libpurple/protocols/msn/nexus.c @ 21286:b2e646507c18
Use only the first 16 characters of the password, and plug a leak.
Fixes #3320, thanks phroggie
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Sat, 10 Nov 2007 05:20:46 +0000 |
parents | deebe08df2e9 |
children | f5874552b8d5 |
line wrap: on
line diff
--- a/libpurple/protocols/msn/nexus.c Sat Nov 10 05:16:58 2007 +0000 +++ b/libpurple/protocols/msn/nexus.c Sat Nov 10 05:20:46 2007 +0000 @@ -148,7 +148,7 @@ /*prepare the Windows Live ID authentication token*/ username = g_strdup(purple_account_get_username(session->account)); - password = g_strdup(purple_connection_get_password(session->account->gc)); + password = g_strndup(purple_connection_get_password(session->account->gc), 16); lc = (char *)g_hash_table_lookup(nexus->challenge_data, "lc"); id = (char *)g_hash_table_lookup(nexus->challenge_data, "id"); @@ -212,6 +212,7 @@ g_free(rst3_str); #endif g_free(fs); + g_free(password); soap = msn_soap_message_new(NULL, xmlnode_from_str(tail, -1)); g_free(tail);