diff src/win32/win32dep.c @ 9916:4d17a945aab3

[gaim-migrate @ 10808] (19:15:38) datallah: LSchiere: here is that BSS overflow patch committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 30 Aug 2004 23:13:28 +0000
parents e64d5472854b
children 4d3c2749deec
line wrap: on
line diff
--- a/src/win32/win32dep.c	Mon Aug 30 21:59:25 2004 +0000
+++ b/src/win32/win32dep.c	Mon Aug 30 23:13:28 2004 +0000
@@ -395,13 +395,13 @@
 
 char* wgaim_lib_dir(void) {
 	strcpy(lib_dir, wgaim_install_dir());
-	strcat(lib_dir, G_DIR_SEPARATOR_S "plugins");
+	g_strlcat(lib_dir, G_DIR_SEPARATOR_S "plugins", sizeof(lib_dir));
 	return (char*)&lib_dir;
 }
 
 char* wgaim_locale_dir(void) {
 	strcpy(locale_dir, wgaim_install_dir());
-	strcat(locale_dir, G_DIR_SEPARATOR_S "locale");
+	g_strlcat(locale_dir, G_DIR_SEPARATOR_S "locale", sizeof(locale_dir));
 	return (char*)&locale_dir;
 }
 
@@ -594,7 +594,7 @@
                 move_settings_dir();
         }
         else {
-                strcpy(app_data_dir, newenv);
+                g_strlcpy(app_data_dir, newenv, sizeof(app_data_dir));
         }
         gaim_debug(GAIM_DEBUG_INFO, "wgaim", "Gaim settings dir: %s\n", app_data_dir);