# HG changeset patch # User Luke Schierer # Date 1093907608 0 # Node ID 4d17a945aab32f94ceadf41d65b1c2691e4fcdea # Parent 0ddc84d81eacf7fd5d6a1241901425907d8358c0 [gaim-migrate @ 10808] (19:15:38) datallah: LSchiere: here is that BSS overflow patch committer: Tailor Script diff -r 0ddc84d81eac -r 4d17a945aab3 src/util.c --- a/src/util.c Mon Aug 30 21:59:25 2004 +0000 +++ b/src/util.c Mon Aug 30 23:13:28 2004 +0000 @@ -1870,8 +1870,9 @@ const gchar *hd = gaim_home_dir(); if (hd) { - strcpy((char*) &home_dir, hd); - strcat((char*) &home_dir, G_DIR_SEPARATOR_S ".gaim"); + g_strlcpy((char*) &home_dir, hd, sizeof(home_dir)); + g_strlcat((char*) &home_dir, G_DIR_SEPARATOR_S ".gaim", + sizeof(home_dir)); } } @@ -1881,7 +1882,8 @@ void set_gaim_user_dir(const char *dir) { if (dir != NULL && strlen(dir) > 0) { - strcpy((char*) &custom_home_dir, dir); + g_strlcpy((char*) &custom_home_dir, dir, + sizeof(custom_home_dir)); } } diff -r 0ddc84d81eac -r 4d17a945aab3 src/win32/win32dep.c --- 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);