Use only the first 16 characters of the password, and plug a leak.

Sat, 10 Nov 2007 05:20:46 +0000

author
Ka-Hing Cheung <khc@pidgin.im>
date
Sat, 10 Nov 2007 05:20:46 +0000
changeset 21455
25bb99ca43cd
parent 21454
2ca06ee152ac
child 21456
7d52da126458
child 21460
3709ba9f7e3b
child 21503
b3cad646ba4a

Use only the first 16 characters of the password, and plug a leak.

Fixes #3320, thanks phroggie

libpurple/protocols/msn/nexus.c file | annotate | diff | comparison | revisions
--- 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);

mercurial