changeset 32236:5f6bbe89d873

Use g_strlcpy instead of strcpy in MSN alias string creation. Thanks to the Electronic Frontier Foundation (https://www.eff.org/) for this patch.
author Ethan Blanton <elb@pidgin.im>
date Sun, 17 Jul 2011 21:10:42 +0000
parents 5498ee1aa30b
children 514092c20438
files libpurple/protocols/msn/msn.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/msn.c	Sun Jul 17 21:04:52 2011 +0000
+++ b/libpurple/protocols/msn/msn.c	Sun Jul 17 21:10:42 2011 +0000
@@ -265,9 +265,9 @@
 		}
 
 		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;