changeset 32231:e529d0b57a5f

Replace an unchecked strcpy with g_strlcpy(). Thanks to the Electronic Frontier Foundation (https://www.eff.org/) for this patch.
author Ethan Blanton <elb@pidgin.im>
date Sun, 17 Jul 2011 17:48:47 +0000
parents d5a00aa868f3
children 4ad2a0668687
files libpurple/win32/libc_interface.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/win32/libc_interface.c	Sun Jul 17 17:34:55 2011 +0000
+++ b/libpurple/win32/libc_interface.c	Sun Jul 17 17:48:47 2011 +0000
@@ -982,7 +982,7 @@
 		if (strcmp(tzname, zonename) == 0)
 		{
 			/* Matched zone */
-			strcpy(localtzname, keyname);
+			g_strlcpy(localtzname, keyname, sizeof(localtzname));
 			RegCloseKey(key);
 			break;
 		}
@@ -997,7 +997,7 @@
 		if (strcmp(tzname, zonename) == 0)
 		{
 			/* Matched DST zone */
-			strcpy(localtzname, keyname);
+			g_strlcpy(localtzname, keyname, sizeof(localtzname));
 			RegCloseKey(key);
 			break;
 		}