pidgin: 89255b10: Use g_strlcpy instead of strcpy in MSN a...

elb at pidgin.im elb at pidgin.im
Thu Aug 11 10:51:48 EDT 2011


----------------------------------------------------------------------
Revision: 89255b1077e1842abfc8a95aaa075f01fce9c77c
Parent:   35387f98f5934f8ae5ca7059381caae9d8b8c401
Author:   elb at pidgin.im
Date:     07/17/11 17:10:42
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/89255b1077e1842abfc8a95aaa075f01fce9c77c

Changelog: 

Use g_strlcpy instead of strcpy in MSN alias string creation.

Thanks to the Electronic Frontier Foundation (https://www.eff.org/) for
this patch.

Changes against parent 35387f98f5934f8ae5ca7059381caae9d8b8c401

  patched  libpurple/protocols/msn/msn.c

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/msn.c	05271130bd391a7ec1d4816e41d07e4d7e6b5338
+++ libpurple/protocols/msn/msn.c	bb50121259b8427e3b569b7e588392a4c4d377c1
@@ -265,9 +265,9 @@ msn_set_public_alias(PurpleConnection *p
 		}
 
 		if (real_alias[0] == '\0')
-			strcpy(real_alias, purple_account_get_username(account));
+			g_strlcpy(real_alias, purple_account_get_username(account), sizeof(real_alias));
 	} else
-		strcpy(real_alias, purple_account_get_username(account));
+		g_strlcpy(real_alias, purple_account_get_username(account), sizeof(real_alias));
 
 	closure = g_new0(struct public_alias_closure, 1);
 	closure->account = account;


More information about the Commits mailing list