[boinc] 02/07: Imported Upstream version 7.6.28+dfsg

Gianfranco Costamagna locutusofborg-guest at moszumanska.debian.org
Tue Feb 23 16:53:16 UTC 2016


This is an automated email from the git hooks/post-receive script.

locutusofborg-guest pushed a commit to branch master
in repository boinc.

commit 72d2555a840531bcfa796120051eeb16649e3de0
Author: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
Date:   Tue Feb 23 17:16:04 2016 +0100

    Imported Upstream version 7.6.28+dfsg
---
 android/BOINC/AndroidManifest.xml           |   4 +-
 android/BOINC/res/values-zh-rTW/strings.xml |   4 +-
 api/boinc_api.cpp                           |  12 +-
 client/acct_mgr.cpp                         |  32 ++-
 client/acct_mgr.h                           |   5 +-
 client/acct_setup.cpp                       |  14 +-
 client/acct_setup.h                         |   4 +-
 client/app.cpp                              |  31 ++-
 client/app_config.cpp                       |   2 +-
 client/app_control.cpp                      |   8 +-
 client/app_start.cpp                        |  97 +++----
 client/async_file.cpp                       |  10 +-
 client/async_file.h                         |   7 +-
 client/boinc_cmd.cpp                        |   2 +-
 client/boinc_log.cpp                        |  10 +-
 client/client_msgs.cpp                      |   6 +-
 client/client_state.cpp                     |  40 +--
 client/client_types.cpp                     |  52 ++--
 client/client_types.h                       |   5 +-
 client/cs_account.cpp                       |  14 +-
 client/cs_benchmark.cpp                     |   8 +-
 client/cs_files.cpp                         |  15 +-
 client/cs_notice.cpp                        |  48 ++--
 client/cs_notice.h                          |   4 +-
 client/cs_scheduler.cpp                     |  18 +-
 client/cs_statefile.cpp                     |   8 +-
 client/cs_trickle.cpp                       |  23 +-
 client/file_names.cpp                       |  12 +-
 client/file_names.h                         |   4 +-
 client/file_xfer.cpp                        |  15 +-
 client/gpu_amd.cpp                          |  14 +-
 client/gui_rpc_server.cpp                   |   8 +-
 client/gui_rpc_server_ops.cpp               |  19 +-
 client/hostinfo_network.cpp                 |  18 +-
 client/hostinfo_win.cpp                     | 354 ++++++++++++------------
 client/http_curl.cpp                        |  50 ++--
 client/log_flags.cpp                        |  91 ++++---
 client/main.cpp                             |   8 +-
 client/project.cpp                          |  38 +--
 client/result.cpp                           |  52 ++--
 client/rr_sim.cpp                           |  15 +-
 client/sandbox.cpp                          |  14 +-
 client/scheduler_op.cpp                     |  30 +-
 client/sim.cpp                              |   3 +-
 client/sim_util.cpp                         |   4 +-
 client/sysmon_win.cpp                       |  20 +-
 client/time_stats.cpp                       |  12 +-
 client/work_fetch.cpp                       |  51 ++--
 client/work_fetch.h                         |   4 +-
 clientgui/AccountInfoPage.cpp               |   4 +-
 clientgui/AdvancedFrame.cpp                 |   2 +-
 clientgui/BOINCBaseWizard.cpp               |  26 --
 clientgui/BOINCBaseWizard.h                 |   4 -
 clientgui/MainDocument.cpp                  |   7 +-
 clientgui/ProjectProcessingPage.cpp         |  15 +-
 clientgui/ProjectWelcomePage.cpp            |   4 +-
 clientgui/WizardAttach.cpp                  | 157 ++++++-----
 clientgui/WizardAttach.h                    |  14 +-
 clientgui/browser.cpp                       |  13 +-
 clientgui/sg_ProjectPanel.cpp               |   6 +-
 clientgui/sg_TaskPanel.cpp                  |  16 +-
 clientscr/ss_app.cpp                        |  30 +-
 configure.ac                                |   2 +-
 lib/app_ipc.cpp                             |  35 ++-
 lib/app_ipc.h                               |   3 +-
 lib/boinc_win.h                             |   3 -
 lib/common_defs.h                           |   3 +-
 lib/coproc.cpp                              |  34 +--
 lib/coproc.h                                |   5 +-
 lib/diagnostics.cpp                         |  30 +-
 lib/diagnostics_win.cpp                     |  15 +-
 lib/filesys.cpp                             |  49 ++--
 lib/gui_rpc_client.cpp                      |   6 +-
 lib/gui_rpc_client.h                        |   4 +-
 lib/gui_rpc_client_ops.cpp                  | 101 ++++---
 lib/hostinfo.cpp                            |  25 +-
 lib/md5.cpp                                 |  40 +--
 lib/md5_file.cpp                            |   4 +
 lib/mfile.cpp                               |   1 +
 lib/miofile.cpp                             |   5 +-
 lib/msg_log.cpp                             |   3 +-
 lib/network.cpp                             |  17 +-
 lib/notice.cpp                              |  12 +-
 lib/parse.cpp                               |  63 ++++-
 lib/parse.h                                 |   1 +
 lib/prefs.cpp                               |   5 +-
 lib/project_init.cpp                        |  11 +-
 lib/proxy_info.cpp                          |  17 +-
 lib/run_app_windows.cpp                     |   7 +-
 lib/shmem.cpp                               |  16 +-
 lib/stackwalker_win.cpp                     |  23 +-
 lib/str_util.cpp                            |  16 +-
 lib/url.cpp                                 |  12 +-
 lib/util.cpp                                |  19 +-
 lib/win_util.cpp                            |   5 +-
 locale/fr/BOINC-Drupal.po                   |   6 +-
 locale/fr/BOINC-Manager.po                  |   2 +-
 locale/fr/BOINC-Project-Generic.po          |   7 +-
 locale/fr/BOINC-Setup.po                    |  19 +-
 locale/fr/BOINC-Web.po                      | 406 +++++++++++++++++++---------
 locale/hu/BOINC-Manager.po                  |  28 +-
 locale/it_IT/BOINC-Web.po                   |  31 ++-
 locale/zh_TW/BOINC-Manager.po               |   2 +-
 sched/edf_sim.h                             |   2 +-
 version.log                                 |   2 +-
 105 files changed, 1555 insertions(+), 1159 deletions(-)

diff --git a/android/BOINC/AndroidManifest.xml b/android/BOINC/AndroidManifest.xml
index d961388..6e7ebdd 100644
--- a/android/BOINC/AndroidManifest.xml
+++ b/android/BOINC/AndroidManifest.xml
@@ -20,8 +20,8 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="edu.berkeley.boinc"
     android:installLocation="internalOnly"
-    android:versionCode="138"
-    android:versionName="7.6.25" > <!-- installation on SD card would break boot receiver -->
+    android:versionCode="141"
+    android:versionName="7.6.28" > <!-- installation on SD card would break boot receiver -->
 
 
     <!-- Add Google Play store metadata informing the store we can run on tablets and other large screen devices -->
diff --git a/android/BOINC/res/values-zh-rTW/strings.xml b/android/BOINC/res/values-zh-rTW/strings.xml
index 678e42b..50e5708 100644
--- a/android/BOINC/res/values-zh-rTW/strings.xml
+++ b/android/BOINC/res/values-zh-rTW/strings.xml
@@ -20,7 +20,7 @@
   <string name="attachproject_credential_input_sing_desc">輸入帳號資訊</string>
   <string name="attachproject_credential_input_desc">輸入專案的帳號資訊:</string>
   <string name="attachproject_credential_input_show_pwd">顯示密碼</string>
-  <string name="attachproject_individual_credential_input">單獨加入專案</string>
+  <string name="attachproject_individual_credential_input">個別加入專案</string>
   <!--conflicts-->
   <string name="attachproject_conflicts_desc">加入研究專案時發生問題:</string>
   <string name="attachproject_conflict_undefined">無法連線</string>
@@ -161,7 +161,7 @@
   <string name="prefs_stationary_device_mode_header">固定裝置模式</string>
   <string name="prefs_stationary_device_mode_description">忽略電源設定執行運算。僅能於裝置沒有電池時使用。</string>
   <string name="prefs_power_source_header">運算電源選項</string>
-  <string name="prefs_power_source_description">選擇可讓BOINC使用的電力來源</string>
+  <string name="prefs_power_source_description">選擇允許 BOINC 執行的電力來源</string>
   <string name="prefs_power_source_ac">充電器</string>
   <string name="prefs_power_source_usb">USB連線</string>
   <string name="prefs_power_source_wireless">無線充電</string>
diff --git a/api/boinc_api.cpp b/api/boinc_api.cpp
index e6e2591..d7cde44 100644
--- a/api/boinc_api.cpp
+++ b/api/boinc_api.cpp
@@ -668,12 +668,12 @@ int boinc_get_status(BOINC_STATUS *s) {
 static void send_trickle_up_msg() {
     char buf[MSG_CHANNEL_SIZE];
     if (standalone) return;
-    strcpy(buf, "");
+    safe_strcpy(buf, "");
     if (have_new_trickle_up) {
-        strcat(buf, "<have_new_trickle_up/>\n");
+        safe_strcat(buf, "<have_new_trickle_up/>\n");
     }
     if (have_new_upload_file) {
-        strcat(buf, "<have_new_upload_file/>\n");
+        safe_strcat(buf, "<have_new_upload_file/>\n");
     }
     if (strlen(buf)) {
         BOINCINFO("Sending Trickle Up Message");
@@ -891,15 +891,15 @@ int boinc_report_app_status_aux(
     );
     if (other_pid) {
         sprintf(buf, "<other_pid>%d</other_pid>\n", other_pid);
-        strcat(msg_buf, buf);
+        safe_strcat(msg_buf, buf);
     }
     if (_bytes_sent) {
         sprintf(buf, "<bytes_sent>%f</bytes_sent>\n", _bytes_sent);
-        strcat(msg_buf, buf);
+        safe_strcat(msg_buf, buf);
     }
     if (_bytes_received) {
         sprintf(buf, "<bytes_received>%f</bytes_received>\n", _bytes_received);
-        strcat(msg_buf, buf);
+        safe_strcat(msg_buf, buf);
     }
     if (app_client_shm->shm->app_status.send_msg(msg_buf)) {
         return 0;
diff --git a/client/acct_mgr.cpp b/client/acct_mgr.cpp
index ac670c8..c7db2d8 100644
--- a/client/acct_mgr.cpp
+++ b/client/acct_mgr.cpp
@@ -24,6 +24,10 @@
 #include <cstring>
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #include "crypt.h"
 #include "error_numbers.h"
 #include "parse.h"
@@ -129,7 +133,7 @@ int ACCT_MGR_OP::do_rpc(
             fprintf(f,"   <gui_rpc_port>%d</gui_rpc_port>\n", GUI_RPC_PORT);
         }
         if (boinc_file_exists(GUI_RPC_PASSWD_FILE)) {
-            strcpy(password, "");
+            safe_strcpy(password, "");
             pwdf = fopen(GUI_RPC_PASSWD_FILE, "r");
             if (pwdf) {
                 if (fgets(password, 256, pwdf)) {
@@ -201,7 +205,7 @@ int ACCT_MGR_OP::do_rpc(
     gstate.net_stats.write(mf);
     fprintf(f, "</acct_mgr_request>\n");
     fclose(f);
-    sprintf(buf, "%srpc.php", url);
+    snprintf(buf, sizeof(buf), "%srpc.php", url);
     retval = gui_http->do_rpc_post(
         this, buf, ACCT_MGR_REQUEST_FILENAME, ACCT_MGR_REPLY_FILENAME, true
     );
@@ -234,7 +238,7 @@ int AM_ACCOUNT::parse(XML_PARSER& xp) {
     suspend.init();
     abort_not_started.init();
     url = "";
-    strcpy(url_signature, "");
+    safe_strcpy(url_signature, "");
     authenticator = "";
     resource_share.init();
 
@@ -256,7 +260,7 @@ int AM_ACCOUNT::parse(XML_PARSER& xp) {
         if (xp.match_tag("url_signature")) {
             retval = xp.element_contents("</url_signature>", url_signature, sizeof(url_signature));
             if (retval) return retval;
-            strcat(url_signature, "\n");
+            safe_strcat(url_signature, "\n");
             continue;
         }
         if (xp.parse_string("authenticator", authenticator)) continue;
@@ -330,8 +334,8 @@ int ACCT_MGR_OP::parse(FILE* f) {
     error_str = "";
     error_num = 0;
     repeat_sec = 0;
-    strcpy(host_venue, "");
-    strcpy(ami.opaque, "");
+    safe_strcpy(host_venue, "");
+    safe_strcpy(ami.opaque, "");
     ami.no_project_notices = false;
     rss_feeds.clear();
     if (!xp.parse_start("acct_mgr_reply")) return ERR_XML_PARSE;
@@ -755,14 +759,14 @@ int ACCT_MGR_INFO::write_info() {
 }
 
 void ACCT_MGR_INFO::clear() {
-    strcpy(project_name, "");
-    strcpy(master_url, "");
-    strcpy(login_name, "");
-    strcpy(password_hash, "");
-    strcpy(signing_key, "");
-    strcpy(previous_host_cpid, "");
-    strcpy(opaque, "");
-    strcpy(cookie_failure_url, "");
+    safe_strcpy(project_name, "");
+    safe_strcpy(master_url, "");
+    safe_strcpy(login_name, "");
+    safe_strcpy(password_hash, "");
+    safe_strcpy(signing_key, "");
+    safe_strcpy(previous_host_cpid, "");
+    safe_strcpy(opaque, "");
+    safe_strcpy(cookie_failure_url, "");
     next_rpc_time = 0;
     nfailures = 0;
     send_gui_rpc_info = false;
diff --git a/client/acct_mgr.h b/client/acct_mgr.h
index 5f2c397..f1a0fef 100644
--- a/client/acct_mgr.h
+++ b/client/acct_mgr.h
@@ -21,6 +21,7 @@
 #include <string>
 #include <vector>
 
+#include "str_replace.h"
 #include "miofile.h"
 #include "parse.h"
 #include "gui_http.h"
@@ -111,7 +112,7 @@ struct AM_ACCOUNT {
     void handle_no_rsc(const char*, bool);
     int parse(XML_PARSER&);
     AM_ACCOUNT() {
-      strcpy(url_signature, "");
+      safe_strcpy(url_signature, "");
       detach = false;
       update = false;
       dont_request_more_work.init();
@@ -150,7 +151,7 @@ struct ACCT_MGR_OP: public GUI_HTTP_OP {
         error_num = BOINC_SUCCESS;
         repeat_sec = 60.0;
         global_prefs_xml = 0;
-        strcpy(host_venue, "");
+        safe_strcpy(host_venue, "");
         got_rss_feeds = false;
     }
     virtual ~ACCT_MGR_OP(){}
diff --git a/client/acct_setup.cpp b/client/acct_setup.cpp
index 3a7b905..e67c348 100644
--- a/client/acct_setup.cpp
+++ b/client/acct_setup.cpp
@@ -42,9 +42,9 @@ void ACCOUNT_IN::parse(XML_PARSER& xp) {
     passwd_hash = "";
     user_name = "";
     team_name = "";
-    server_hash = "";
+    server_cookie = "";
     ldap_auth = false;
-    server_assigned_hash = false;
+    server_assigned_cookie = false;
 
     while (!xp.get_tag()) {
         if (xp.parse_string("url", url)) continue;
@@ -52,9 +52,9 @@ void ACCOUNT_IN::parse(XML_PARSER& xp) {
         if (xp.parse_string("passwd_hash", passwd_hash)) continue;
         if (xp.parse_string("user_name", user_name)) continue;
         if (xp.parse_string("team_name", team_name)) continue;
-        if (xp.parse_string("server_hash", server_hash)) continue;
+        if (xp.parse_string("server_cookie", server_cookie)) continue;
         if (xp.parse_bool("ldap_auth", ldap_auth)) continue;
-        if (xp.parse_bool("server_assigned_hash", server_assigned_hash)) continue;
+        if (xp.parse_bool("server_assigned_cookie", server_assigned_cookie)) continue;
     }
     canonicalize_master_url(url);
 }
@@ -113,11 +113,11 @@ int LOOKUP_ACCOUNT_OP::do_rpc(ACCOUNT_IN& ai) {
         parameter = ai.passwd_hash;
         escape_url(parameter);
         url += parameter;
-    } else if (ai.server_assigned_hash) {
+    } else if (ai.server_assigned_cookie) {
         // Project assigned cookie
         //
-        url += "?server_assigned_hash=1&hash=";
-        parameter = ai.server_hash;
+        url += "?server_assigned_cookie=1&server_cookie=";
+        parameter = ai.server_cookie;
         escape_url(parameter);
         url += parameter;
     } else {
diff --git a/client/acct_setup.h b/client/acct_setup.h
index 90ccb46..3c37a9f 100644
--- a/client/acct_setup.h
+++ b/client/acct_setup.h
@@ -30,9 +30,9 @@ struct ACCOUNT_IN {
         // the suggested friendly name for the user during account creation.
     std::string team_name;
     std::string passwd_hash;
-    std::string server_hash;
+    std::string server_cookie;
     bool ldap_auth;
-    bool server_assigned_hash;
+    bool server_assigned_cookie;
 
     void parse(XML_PARSER&);
 };
diff --git a/client/app.cpp b/client/app.cpp
index ebc7508..712e8fd 100644
--- a/client/app.cpp
+++ b/client/app.cpp
@@ -52,6 +52,9 @@
 #include <cstdlib>
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
 
 #include "error_numbers.h"
 #include "filesys.h"
@@ -90,7 +93,7 @@ ACTIVE_TASK::~ACTIVE_TASK() {
 
 ACTIVE_TASK::ACTIVE_TASK() {
 #ifdef _WIN32
-    strcpy(shmem_seg_name, "");
+    safe_strcpy(shmem_seg_name, "");
 #else
     shmem_seg_name = 0;
 #endif
@@ -125,8 +128,8 @@ ACTIVE_TASK::ACTIVE_TASK() {
     bytes_received_episode = 0;
     bytes_sent = 0;
     bytes_received = 0;
-    strcpy(slot_dir, "");
-    strcpy(slot_path, "");
+    safe_strcpy(slot_dir, "");
+    safe_strcpy(slot_path, "");
     max_elapsed_time = 0;
     max_disk_usage = 0;
     max_mem_usage = 0;
@@ -147,8 +150,8 @@ ACTIVE_TASK::ACTIVE_TASK() {
     premature_exit_count = 0;
     overdue_checkpoint = false;
     last_deadline_miss_time = 0;
-    strcpy(web_graphics_url, "");
-    strcpy(remote_desktop_addr, "");
+    safe_strcpy(web_graphics_url, "");
+    safe_strcpy(remote_desktop_addr, "");
     async_copy = NULL;
     finish_file_time = 0;
 }
@@ -517,8 +520,11 @@ int ACTIVE_TASK::move_trickle_file() {
     char new_path[MAXPATHLEN], old_path[MAXPATHLEN];
     int retval;
 
-    sprintf(old_path, "%s/trickle_up.xml", slot_dir);
-    sprintf(new_path,
+    snprintf(old_path, sizeof(old_path),
+        "%s/trickle_up.xml",
+        slot_dir
+    );
+    snprintf(new_path, sizeof(new_path),
         "%s/trickle_up_%s_%d.xml",
         result->project->project_dir(), result->name, (int)time(0)
     );
@@ -775,8 +781,8 @@ int ACTIVE_TASK::parse(XML_PARSER& xp) {
     PROJECT* project=0;
     double x;
 
-    strcpy(result_name, "");
-    strcpy(project_master_url, "");
+    safe_strcpy(result_name, "");
+    safe_strcpy(project_master_url, "");
 
     while (!xp.get_tag()) {
         if (xp.match_tag("/active_task")) {
@@ -1060,7 +1066,7 @@ int ACTIVE_TASK::handle_upload_files() {
                     "Can't find uploadable file %s", p
                 );
             }
-            sprintf(path, "%s/%s", slot_dir, buf);
+            snprintf(path, sizeof(path), "%s/%s", slot_dir, buf);
             delete_project_owned_file(path, true);  // delete the link file
         }
     }
@@ -1095,7 +1101,10 @@ void ACTIVE_TASK_SET::network_available() {
 
 void ACTIVE_TASK::upload_notify_app(const FILE_INFO* fip, const FILE_REF* frp) {
     char path[MAXPATHLEN];
-    sprintf(path, "%s/%s%s", slot_dir, UPLOAD_FILE_STATUS_PREFIX, frp->open_name);
+    snprintf(path, sizeof(path), 
+        "%s/%s%s",
+        slot_dir, UPLOAD_FILE_STATUS_PREFIX, frp->open_name
+    );
     FILE* f = boinc_fopen(path, "w");
     if (!f) return;
     fprintf(f, "<status>%d</status>\n", fip->status);
diff --git a/client/app_config.cpp b/client/app_config.cpp
index b9440a7..92823aa 100644
--- a/client/app_config.cpp
+++ b/client/app_config.cpp
@@ -240,7 +240,7 @@ int APP_CONFIGS::config_app_versions(PROJECT* p, bool show_warnings) {
             if (strcmp(avp->plan_class, avc.plan_class)) continue;
             found = true;
             if (strlen(avc.cmdline)) {
-                strcpy(avp->cmdline, avc.cmdline);
+                safe_strcpy(avp->cmdline, avc.cmdline);
             }
             if (avc.avg_ncpus) {
                 avp->avg_ncpus = avc.avg_ncpus;
diff --git a/client/app_control.cpp b/client/app_control.cpp
index f6c83d1..7458863 100644
--- a/client/app_control.cpp
+++ b/client/app_control.cpp
@@ -466,7 +466,7 @@ void ACTIVE_TASK::handle_exited_app(int stat) {
             double x;
             bool is_notice;
             char buf[256];
-            strcpy(buf, "");
+            safe_strcpy(buf, "");
             if (temporary_exit_file_present(x, buf, is_notice)) {
                 handle_temporary_exit(will_restart, x, buf, is_notice);
             } else {
@@ -611,8 +611,8 @@ void ACTIVE_TASK::handle_exited_app(int stat) {
 //
 bool ACTIVE_TASK::finish_file_present() {
     char path[MAXPATHLEN], buf[1024], buf2[256];
-    strcpy(buf, "");
-    strcpy(buf2, "");
+    safe_strcpy(buf, "");
+    safe_strcpy(buf2, "");
     sprintf(path, "%s/%s", slot_dir, BOINC_FINISH_CALLED_FILE);
     FILE* f = boinc_fopen(path, "r");
     if (!f) return false;
@@ -693,7 +693,7 @@ void ACTIVE_TASK_SET::send_heartbeats() {
             atp->procinfo.working_set_size, ar
         );
         if (gstate.network_suspended) {
-            strcat(buf, "<network_suspended/>");
+            safe_strcat(buf, "<network_suspended/>");
         }
         bool sent = atp->app_client_shm.shm->heartbeat.send_msg(buf);
         if (log_flags.heartbeat_debug) {
diff --git a/client/app_start.cpp b/client/app_start.cpp
index 45f5364..cc3bae5 100644
--- a/client/app_start.cpp
+++ b/client/app_start.cpp
@@ -22,11 +22,11 @@
 #ifdef _WIN32
 #include "boinc_win.h"
 #include "win_util.h"
-#define unlink _unlink
+#define unlink   _unlink
 #ifdef _MSC_VER
 #define snprintf _snprintf
 #define strdup   _strdup
-#define getcwd  _getcwd
+#define getcwd   _getcwd
 #endif
 #else
 #include "config.h"
@@ -121,7 +121,7 @@ static void debug_print_argv(char** argv) {
 // NOTE: this is deprecated.  Use app_init_data instead.
 //
 static void coproc_cmdline(
-    int rsc_type, RESULT* rp, double ninstances, char* cmdline
+    int rsc_type, RESULT* rp, double ninstances, char* cmdline, int cmdline_len
 ) {
     char buf[256];
     COPROC* coproc = &coprocs.coprocs[rsc_type];
@@ -136,7 +136,7 @@ static void coproc_cmdline(
             k = 0;
         }
         sprintf(buf, " --device %d", coproc->device_nums[k]);
-        strcat(cmdline, buf);
+        strlcat(cmdline, buf, cmdline_len);
     }
 }
 
@@ -218,13 +218,7 @@ void ACTIVE_TASK::init_app_init_data(APP_INIT_DATA& aid) {
     safe_strcpy(aid.authenticator, project->authenticator);
     aid.slot = slot;
 #ifdef _WIN32
-    if (strstr(gstate.host_info.os_name, "Windows 2000")) {
-        // Win2K immediately reuses PIDs, so can't use this mechanism
-        //
-        aid.client_pid = 0;
-    } else {
-        aid.client_pid = GetCurrentProcessId();
-    }
+    aid.client_pid = GetCurrentProcessId();
 #else
     aid.client_pid = getpid();
 #endif
@@ -272,7 +266,7 @@ void ACTIVE_TASK::init_app_init_data(APP_INIT_DATA& aid) {
         aid.gpu_opencl_dev_index = cp.opencl_device_indexes[k];
         aid.gpu_usage = app_version->gpu_usage.usage;
     } else {
-        strcpy(aid.gpu_type, "");
+        safe_strcpy(aid.gpu_type, "");
         aid.gpu_device_num = -1;
         aid.gpu_opencl_dev_index = -1;
         aid.gpu_usage = 0;
@@ -346,8 +340,8 @@ static int create_dirs_for_logical_name(
         char* q = strstr(p, "/");
         if (!q) break;
         *q = 0;
-        strcat(dir_path, "/");
-        strcat(dir_path, p);
+        safe_strcat(dir_path, "/");
+        safe_strcat(dir_path, p);
         retval = boinc_mkdir(dir_path);
         if (retval) return retval;
         p = q+1;
@@ -357,7 +351,7 @@ static int create_dirs_for_logical_name(
 
 static void prepend_prefix(APP_VERSION* avp, char* in, char* out, int len) {
     if (strlen(avp->file_prefix)) {
-        sprintf(out, "%s/%s", avp->file_prefix, in);
+        snprintf(out, len, "%s/%s", avp->file_prefix, in);
     } else {
         strlcpy(out, in, len);
     }
@@ -401,12 +395,12 @@ int ACTIVE_TASK::setup_file(
         }
         retval = create_dirs_for_logical_name(open_name, slot_dir);
         if (retval) return retval;
-        sprintf(link_path, "%s/%s", slot_dir, open_name);
+        snprintf(link_path, sizeof(link_path), "%s/%s", slot_dir, open_name);
     } else {
-        sprintf(link_path, "%s/%s", slot_dir, fip->name);
+        snprintf(link_path, sizeof(link_path), "%s/%s", slot_dir, fip->name);
     }
 
-    sprintf(rel_file_path, "../../%s", file_path );
+    snprintf(rel_file_path, sizeof(rel_file_path), "../../%s", file_path );
 
     if (boinc_file_exists(link_path)) {
         return 0;
@@ -482,7 +476,7 @@ int ACTIVE_TASK::copy_output_files() {
         prepend_prefix(
             app_version, fref.open_name, open_name, sizeof(open_name)
         );
-        sprintf(slotfile, "%s/%s", slot_dir, open_name);
+        snprintf(slotfile, sizeof(slotfile), "%s/%s", slot_dir, open_name);
         get_pathname(fip, projfile, sizeof(projfile));
         int retval = boinc_rename(slotfile, projfile);
         // the rename fails if the output file isn't there.
@@ -612,7 +606,7 @@ int ACTIVE_TASK::start(bool test) {
     if (!app_client_shm.shm) {
         retval = get_shmem_seg_name();
         if (retval) {
-            sprintf(buf,
+            snprintf(buf, sizeof(buf),
                 "Can't get shared memory segment name: %s",
                 boincerror(retval)
             );
@@ -626,17 +620,17 @@ int ACTIVE_TASK::start(bool test) {
     init_app_init_data(aid);
     retval = write_app_init_file(aid);
     if (retval) {
-        sprintf(buf, "Can't write init file: %s", boincerror(retval));
+        snprintf(buf, sizeof(buf), "Can't write init file: %s", boincerror(retval));
         goto error;
     }
 
     // set up applications files
     //
     if (test) {
-        strcpy(exec_name, "test_app");
-        strcpy(exec_path, "test_app");
+        safe_strcpy(exec_name, "test_app");
+        safe_strcpy(exec_path, "test_app");
     } else {
-        strcpy(exec_name, "");
+        safe_strcpy(exec_name, "");
     }
     for (i=0; i<app_version->app_files.size(); i++) {
         fref = app_version->app_files[i];
@@ -644,12 +638,12 @@ int ACTIVE_TASK::start(bool test) {
         get_pathname(fip, file_path, sizeof(file_path));
         if (fref.main_program) {
             if (is_image_file(fip->name)) {
-                sprintf(buf, "Main program %s is an image file", fip->name);
+                snprintf(buf, sizeof(buf), "Main program %s is an image file", fip->name);
                 retval = ERR_NO_SIGNATURE;
                 goto error;
             }
             if (!fip->executable && !wup->project->anonymous_platform) {
-                sprintf(buf, "Main program %s is not executable", fip->name);
+                snprintf(buf, sizeof(buf), "Main program %s is not executable", fip->name);
                 retval = ERR_NO_SIGNATURE;
                 goto error;
             }
@@ -703,7 +697,7 @@ int ACTIVE_TASK::start(bool test) {
 
     // remove temporary exit file from last run
     //
-    sprintf(file_path, "%s/%s", slot_dir, TEMPORARY_EXIT_FILE);
+    snprintf(file_path, sizeof(file_path), "%s/%s", slot_dir, TEMPORARY_EXIT_FILE);
     delete_project_owned_file(file_path, true);
 
     if (cc_config.exit_before_start) {
@@ -738,13 +732,14 @@ int ACTIVE_TASK::start(bool test) {
         return 0;
     }
 
-    sprintf(cmdline, "%s %s %s",
+    snprintf(cmdline, sizeof(cmdline),
+        "%s %s %s",
         exec_path, wup->command_line.c_str(), app_version->cmdline
     );
     if (!app_version->api_version_at_least(7, 5)) {
         int rt = app_version->gpu_usage.rsc_type;
         if (rt) {
-            coproc_cmdline(rt, result, app_version->gpu_usage.usage, cmdline);
+            coproc_cmdline(rt, result, app_version->gpu_usage.usage, cmdline, sizeof(cmdline));
         }
     }
 
@@ -831,7 +826,7 @@ int ACTIVE_TASK::start(bool test) {
     }
 
     if (!success) {
-        sprintf(buf, "CreateProcess() failed - %s", error_msg);
+        snprintf(buf, sizeof(buf), "CreateProcess() failed - %s", error_msg);
 
         if (last_error == ERROR_NOT_ENOUGH_MEMORY) {
             // if CreateProcess() failed because system is low on memory,
@@ -881,20 +876,19 @@ int ACTIVE_TASK::start(bool test) {
     //freopen(STDERR_FILE, "a", stderr);
 
     argv[0] = exec_name;
-    char cmdline[8192];
     safe_strcpy(cmdline, wup->command_line.c_str());
     if (strlen(result->cmdline)) {
-        strcat(cmdline, " ");
-        strcat(cmdline, result->cmdline);
+        safe_strcat(cmdline, " ");
+        safe_strcat(cmdline, result->cmdline);
     }
     parse_command_line(cmdline, argv+1);
     if (log_flags.task_debug) {
         debug_print_argv(argv);
     }
-    sprintf(buf, "../../%s", exec_path );
+    snprintf(buf, sizeof(buf), "../../%s", exec_path );
     pid = spawnv(P_NOWAIT, buf, argv);
     if (pid == -1) {
-        sprintf(buf, "Process creation failed: %s\n", boincerror(retval));
+        snprintf(buf, sizeof(buf), "Process creation failed: %s\n", boincerror(retval));
         chdir(current_dir);
         retval = ERR_EXEC;
         goto error;
@@ -923,18 +917,19 @@ int ACTIVE_TASK::start(bool test) {
     char current_dir[1024];
 
     if (getcwd(current_dir, sizeof(current_dir)) == NULL) {
-        sprintf(buf, "Can't get cwd");
+        snprintf(buf, sizeof(buf), "Can't get cwd");
         goto error;
     }
 
-    sprintf(cmdline, "%s %s",
+    snprintf(cmdline, sizeof(cmdline),
+        "%s %s",
         wup->command_line.c_str(), app_version->cmdline
     );
 
     if (!app_version->api_version_at_least(7, 5)) {
         int rt = app_version->gpu_usage.rsc_type;
         if (rt) {
-            coproc_cmdline(rt, result, app_version->gpu_usage.usage, cmdline);
+            coproc_cmdline(rt, result, app_version->gpu_usage.usage, cmdline, sizeof(cmdline));
         }
     }
 
@@ -947,7 +942,7 @@ int ACTIVE_TASK::start(bool test) {
         if (app_version->api_version_at_least(6, 0)) {
 #endif
             // Use mmap() shared memory
-            sprintf(buf, "%s/%s", slot_dir, MMAPPED_FILE_NAME);
+            snprintf(buf, sizeof(buf), "%s/%s", slot_dir, MMAPPED_FILE_NAME);
             if (g_use_sandbox) {
                 if (!boinc_file_exists(buf)) {
                     int fd = open(buf, O_RDWR | O_CREAT, 0660);
@@ -995,7 +990,7 @@ int ACTIVE_TASK::start(bool test) {
     }
     pid = fork();
     if (pid == -1) {
-        sprintf(buf, "fork() failed: %s", strerror(errno));
+        snprintf(buf, sizeof(buf), "fork() failed: %s", strerror(errno));
         retval = ERR_FORK;
         goto error;
     }
@@ -1020,9 +1015,9 @@ int ACTIVE_TASK::start(bool test) {
         //
         char libpath[8192];
         char newlibs[256];
-        sprintf(newlibs, "../../%s:.:../..", wup->project->project_dir());
+        snprintf(newlibs, sizeof(newlibs), "../../%s:.:../..", wup->project->project_dir());
 #ifdef __APPLE__
-        strcat(newlibs, ":/usr/local/cuda/lib/");
+        safe_strcat(newlibs, ":/usr/local/cuda/lib/");
 #endif
         char* p = getenv("LD_LIBRARY_PATH");
         if (p) {
@@ -1113,11 +1108,12 @@ int ACTIVE_TASK::start(bool test) {
         if (test) {
             strcpy(buf, exec_path);
         } else {
-            sprintf(buf, "../../%s", exec_path);
+            snprintf(buf, sizeof(buf), "../../%s", exec_path);
         }
         if (g_use_sandbox) {
             char switcher_path[MAXPATHLEN];
-            sprintf(switcher_path, "../../%s/%s",
+            snprintf(switcher_path, sizeof(switcher_path), 
+                "../../%s/%s",
                 SWITCHER_DIR, SWITCHER_FILE_NAME
             );
             argv[0] = const_cast<char*>(SWITCHER_FILE_NAME);
@@ -1155,9 +1151,6 @@ int ACTIVE_TASK::start(bool test) {
         );
     }
 
-#ifdef ANDROID
-#endif
-
 #endif
     set_task_state(PROCESS_EXECUTING, "start");
     return 0;
@@ -1226,9 +1219,9 @@ int ACTIVE_TASK::resume_or_start(bool first_time) {
     }
     if (log_flags.cpu_sched) {
         char buf[256];
-        strcpy(buf, "");
+        safe_strcpy(buf, "");
         if (strlen(app_version->plan_class)) {
-            sprintf(buf, " (%s)", app_version->plan_class);
+            snprintf(buf, sizeof(buf), " (%s)", app_version->plan_class);
         }
         msg_printf(result->project, MSG_INFO,
             "[cpu_sched] %s task %s using %s version %d%s in slot %d",
@@ -1342,11 +1335,11 @@ void run_test_app() {
     wu.app = &app;
     wu.command_line = string("--critical_section");
 
-    strcpy(app.name, "test app");
+    safe_strcpy(app.name, "test app");
     av.init();
     av.avg_ncpus = 1;
 
-    strcpy(result.name, "test result");
+    safe_strcpy(result.name, "test result");
     result.avp = &av;
     result.wup = &wu;
     result.project = &project;
@@ -1358,7 +1351,7 @@ void run_test_app() {
     at.max_elapsed_time = 1e6;
     at.max_disk_usage = 1e14;
     at.max_mem_usage = 1e14;
-    strcpy(at.slot_dir, ".");
+    safe_strcpy(at.slot_dir, ".");
 
 #if 1
     // test file copy
diff --git a/client/async_file.cpp b/client/async_file.cpp
index 740748a..b19660e 100644
--- a/client/async_file.cpp
+++ b/client/async_file.cpp
@@ -21,6 +21,10 @@
 #include <string.h>
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #include "crypt.h"
 #include "error_numbers.h"
 #include "filesys.h"
@@ -78,8 +82,8 @@ ASYNC_COPY::ASYNC_COPY() {
     in = out = NULL;
     atp = NULL;
     fip = NULL;
-    strcpy(to_path, "");
-    strcpy(temp_path, "");
+    safe_strcpy(to_path, "");
+    safe_strcpy(temp_path, "");
 }
 
 ASYNC_COPY::~ASYNC_COPY() {
@@ -182,7 +186,7 @@ int ASYNC_VERIFY::init(FILE_INFO* _fip) {
 #endif
         out = boinc_fopen(temp_path, "wb");
         if (!out) return ERR_FOPEN;
-        strcat(inpath, ".gz");
+        safe_strcat(inpath, ".gz");
         gzin = gzopen(inpath, "rb");
         if (gzin == Z_NULL) {
             fclose(out);
diff --git a/client/async_file.h b/client/async_file.h
index f099928..a86be55 100644
--- a/client/async_file.h
+++ b/client/async_file.h
@@ -29,6 +29,7 @@
 #include <zlib.h>
 #endif
 
+#include "str_replace.h"
 #include "filesys.h"
 #include "md5.h"
 
@@ -73,9 +74,9 @@ struct ASYNC_VERIFY {
       in = NULL;
       out = NULL;
       gzin = NULL;
-      strcpy(inpath, "");
-      strcpy(temp_path, "");
-      strcpy(outpath, "");
+      safe_strcpy(inpath, "");
+      safe_strcpy(temp_path, "");
+      safe_strcpy(outpath, "");
     };
     ~ASYNC_VERIFY(){};
 
diff --git a/client/boinc_cmd.cpp b/client/boinc_cmd.cpp
index 628e21f..648fd60 100644
--- a/client/boinc_cmd.cpp
+++ b/client/boinc_cmd.cpp
@@ -133,7 +133,7 @@ int main(int argc, char** argv) {
 #ifdef _WIN32
     chdir_to_data_dir();
 #endif
-    strcpy(passwd_buf, "");
+    safe_strcpy(passwd_buf, "");
     read_gui_rpc_password(passwd_buf);
 
 #if defined(_WIN32) && defined(USE_WINSOCK)
diff --git a/client/boinc_log.cpp b/client/boinc_log.cpp
index bda3488..4c11bd1 100644
--- a/client/boinc_log.cpp
+++ b/client/boinc_log.cpp
@@ -121,11 +121,11 @@ int main(int argc, char** argv) {
     std::string msg_body;
     std::string msg_tmp;
 
-    strcpy(buf, "");
-    strcpy(datadir, "");
-    strcpy(hostname_buf, "");
-    strcpy(passwd_buf, "");
-    strcpy(g_log_filename, "");
+    strlcpy(buf, "", sizeof(buf));
+    strlcpy(datadir, "", sizeof(datadir));
+    strlcpy(hostname_buf, "", sizeof(hostname_buf));
+    strlcpy(passwd_buf, "", sizeof(passwd_buf));
+    strlcpy(g_log_filename, "", sizeof(g_log_filename));
     g_message_sequence = 0;
 
 #if defined(_WIN32) && defined(USE_WINSOCK)
diff --git a/client/client_msgs.cpp b/client/client_msgs.cpp
index 55f75b2..2897e22 100644
--- a/client/client_msgs.cpp
+++ b/client/client_msgs.cpp
@@ -94,9 +94,9 @@ void show_message(
     case MSG_SCHEDULER_ALERT:
         char buf[1024];
         if (is_html) {
-            strcpy(buf, message);
+            safe_strcpy(buf, message);
         } else {
-            xml_escape(message, buf, 1024);
+            xml_escape(message, buf, sizeof(message));
         }
         NOTICE n;
         n.description = buf;
@@ -173,7 +173,7 @@ void MESSAGE_DESCS::insert(PROJ_AM* p, int priority, int now, char* message) {
             mdp->project_name, p->get_project_name(), sizeof(mdp->project_name)
         );
     } else {
-        strcpy(mdp->project_name, "");
+        safe_strcpy(mdp->project_name, "");
     }
     mdp->priority = (priority==MSG_SCHEDULER_ALERT)?MSG_USER_ALERT:priority;
     mdp->timestamp = now;
diff --git a/client/client_state.cpp b/client/client_state.cpp
index f3365ae..7b3a65f 100644
--- a/client/client_state.cpp
+++ b/client/client_state.cpp
@@ -36,6 +36,10 @@
 #endif
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #ifdef __EMX__
 #define INCL_DOS
 #include <os2.h>
@@ -119,8 +123,8 @@ CLIENT_STATE::CLIENT_STATE()
 #else
     core_client_version.prerelease = false;
 #endif
-    strcpy(language, "");
-    strcpy(client_brand, "");
+    safe_strcpy(language, "");
+    safe_strcpy(client_brand, "");
     exit_after_app_start_secs = 0;
     app_started = 0;
     exit_before_upload = false;
@@ -129,12 +133,12 @@ CLIENT_STATE::CLIENT_STATE()
     boinc_project_gid = 0;
 #endif
     show_projects = false;
-    strcpy(detach_project_url, "");
-    strcpy(reset_project_url, "");
-    strcpy(update_prefs_url, "");
-    strcpy(main_host_venue, "");
-    strcpy(attach_project_url, "");
-    strcpy(attach_project_auth, "");
+    safe_strcpy(detach_project_url, "");
+    safe_strcpy(reset_project_url, "");
+    safe_strcpy(update_prefs_url, "");
+    safe_strcpy(main_host_venue, "");
+    safe_strcpy(attach_project_url, "");
+    safe_strcpy(attach_project_auth, "");
     cpu_run_mode.set(RUN_MODE_AUTO, 0);
     gpu_run_mode.set(RUN_MODE_AUTO, 0);
     network_run_mode.set(RUN_MODE_AUTO, 0);
@@ -412,7 +416,7 @@ static void set_client_priority() {
 #endif
 #ifdef __linux__
     char buf[1024];
-    sprintf(buf, "ionice -c 3 -p %d", getpid());
+    snprintf(buf, sizeof(buf), "ionice -c 3 -p %d", getpid());
     system(buf);
 #endif
 }
@@ -1003,14 +1007,14 @@ bool CLIENT_STATE::poll_slow_events() {
         if (!old_network_suspend_reason) {
             char buf[256];
             if (network_suspended) {
-                sprintf(buf,
+                snprintf(buf, sizeof(buf),
                     "Suspending network activity - %s",
                     suspend_reason_string(network_suspend_reason)
                 );
                 request_schedule_cpus("network suspended");
                     // in case any "needs_network" jobs are running
             } else {
-                sprintf(buf,
+                snprintf(buf, sizeof(buf),
                     "Suspending file transfers - %s",
                     suspend_reason_string(network_suspend_reason)
                 );
@@ -1234,8 +1238,8 @@ int CLIENT_STATE::link_app_version(PROJECT* p, APP_VERSION* avp) {
 
 #ifndef SIM
 
-    strcpy(avp->graphics_exec_path, "");
-    strcpy(avp->graphics_exec_file, "");
+    safe_strcpy(avp->graphics_exec_path, "");
+    safe_strcpy(avp->graphics_exec_file, "");
 
     for (unsigned int i=0; i<avp->app_files.size(); i++) {
         FILE_REF& file_ref = avp->app_files[i];
@@ -1252,8 +1256,8 @@ int CLIENT_STATE::link_app_version(PROJECT* p, APP_VERSION* avp) {
             char relpath[MAXPATHLEN], path[MAXPATHLEN];
             get_pathname(fip, relpath, sizeof(relpath));
             relative_to_absolute(relpath, path);
-            strlcpy(avp->graphics_exec_path, path, sizeof(avp->graphics_exec_path));
-            strcpy(avp->graphics_exec_file, fip->name);
+            safe_strcpy(avp->graphics_exec_path, path);
+            safe_strcpy(avp->graphics_exec_file, fip->name);
         }
 
         // any file associated with an app version must be signed
@@ -2080,7 +2084,7 @@ int CLIENT_STATE::detach_project(PROJECT* project) {
 
     // delete statistics file
     //
-    get_statistics_filename(project->master_url, path);
+    get_statistics_filename(project->master_url, path, sizeof(path));
     retval = boinc_delete_file(path);
     if (retval) {
         msg_printf(project, MSG_INTERNAL_ERROR,
@@ -2090,7 +2094,7 @@ int CLIENT_STATE::detach_project(PROJECT* project) {
 
     // delete account file
     //
-    get_account_filename(project->master_url, path);
+    get_account_filename(project->master_url, path, sizeof(path));
     retval = boinc_delete_file(path);
     if (retval) {
         msg_printf(project, MSG_INTERNAL_ERROR,
@@ -2231,7 +2235,7 @@ void CLIENT_STATE::log_show_projects() {
         if (p->hostid) {
             sprintf(buf, "%d", p->hostid);
         } else {
-            strcpy(buf, "not assigned yet");
+            safe_strcpy(buf, "not assigned yet");
         }
         msg_printf(p, MSG_INFO,
             "URL %s; Computer ID %s; resource share %.0f",
diff --git a/client/client_types.cpp b/client/client_types.cpp
index 356dbe6..063d224 100644
--- a/client/client_types.cpp
+++ b/client/client_types.cpp
@@ -37,6 +37,10 @@
 #include <cstring>
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #include "error_numbers.h"
 #include "filesys.h"
 #include "log_flags.h"
@@ -120,8 +124,8 @@ int parse_project_files(XML_PARSER& xp, vector<FILE_REF>& project_files) {
 }
 
 int APP::parse(XML_PARSER& xp) {
-    strcpy(name, "");
-    strcpy(user_friendly_name, "");
+    safe_strcpy(name, "");
+    safe_strcpy(user_friendly_name, "");
     project = NULL;
     non_cpu_intensive = false;
     while (!xp.get_tag()) {
@@ -178,8 +182,8 @@ int APP::write(MIOFILE& out) {
 }
 
 FILE_INFO::FILE_INFO() {
-    strcpy(name, "");
-    strcpy(md5_cksum, "");
+    safe_strcpy(name, "");
+    safe_strcpy(md5_cksum, "");
     max_nbytes = 0;
     nbytes = 0;
     gzipped_nbytes = 0;
@@ -203,8 +207,8 @@ FILE_INFO::FILE_INFO() {
     project = NULL;
     download_urls.clear();
     upload_urls.clear();
-    strcpy(xml_signature, "");
-    strcpy(file_signature, "");
+    safe_strcpy(xml_signature, "");
+    safe_strcpy(file_signature, "");
     cert_sigs = 0;
     async_verify = NULL;
 }
@@ -538,9 +542,9 @@ int FILE_INFO::delete_file() {
     // files with download_gzipped set may exist
     // in temporary or compressed form
     //
-    strcat(path, ".gz");
+    safe_strcat(path, ".gz");
     delete_project_owned_file(path, true);
-    strcat(path, "t");
+    safe_strcat(path, "t");
     delete_project_owned_file(path, true);
 
     if (retval && status != FILE_NOT_PRESENT) {
@@ -598,7 +602,7 @@ int FILE_INFO::merge_info(FILE_INFO& new_info) {
 
     if (max_nbytes <= 0 && new_info.max_nbytes) {
         max_nbytes = new_info.max_nbytes;
-        sprintf(buf, "    <max_nbytes>%.0f</max_nbytes>\n", new_info.max_nbytes);
+        snprintf(buf, sizeof(buf), "    <max_nbytes>%.0f</max_nbytes>\n", new_info.max_nbytes);
     }
 
     // replace existing URLs with new ones
@@ -668,7 +672,7 @@ bool FILE_INFO::had_failure(int& failnum) {
 
 void FILE_INFO::failure_message(string& s) {
     char buf[1024];
-    sprintf(buf,
+    snprintf(buf, sizeof(buf), 
         "<file_xfer_error>\n"
         "  <file_name>%s</file_name>\n"
         "  <error_code>%d (%s)</error_code>\n",
@@ -677,7 +681,7 @@ void FILE_INFO::failure_message(string& s) {
     );
     s = buf;
     if (error_msg.size()) {
-        sprintf(buf,
+        snprintf(buf, sizeof(buf),
             "  <error_message>%s</error_message>\n",
             error_msg.c_str()
             );
@@ -758,29 +762,29 @@ int FILE_INFO::gunzip(char* md5_buf) {
 }
 
 void APP_VERSION::init() {
-    strcpy(app_name, "");
+    safe_strcpy(app_name, "");
     version_num = 0;
-    strcpy(platform, "");
-    strcpy(plan_class, "");
-    strcpy(api_version, "");
+    safe_strcpy(platform, "");
+    safe_strcpy(plan_class, "");
+    safe_strcpy(api_version, "");
     avg_ncpus = 1;
     max_ncpus = 1;
     gpu_usage.rsc_type = 0;
     gpu_usage.usage = 0;
     gpu_ram = 0;
     flops = gstate.host_info.p_fpops;
-    strcpy(cmdline, "");
-    strcpy(file_prefix, "");
+    safe_strcpy(cmdline, "");
+    safe_strcpy(file_prefix, "");
     needs_network = false;
     app = NULL;
     project = NULL;
     ref_cnt = 0;
-    strcpy(graphics_exec_path,"");
-    strcpy(graphics_exec_file, "");
+    safe_strcpy(graphics_exec_path,"");
+    safe_strcpy(graphics_exec_file, "");
     max_working_set_size = 0;
     missing_coproc = false;
     missing_coproc_usage = 0.0;
-    strcpy(missing_coproc_name, "");
+    safe_strcpy(missing_coproc_name, "");
     dont_throttle = false;
     is_vm_app = false;
     is_wrapper = false;
@@ -1035,8 +1039,8 @@ bool APP_VERSION::api_version_at_least(int major, int minor) {
 int FILE_REF::parse(XML_PARSER& xp) {
     bool temp;
 
-    strcpy(file_name, "");
-    strcpy(open_name, "");
+    safe_strcpy(file_name, "");
+    safe_strcpy(open_name, "");
     main_program = false;
     copy_file = false;
     optional = false;
@@ -1086,8 +1090,8 @@ int WORKUNIT::parse(XML_PARSER& xp) {
     FILE_REF file_ref;
     double dtemp;
 
-    strcpy(name, "");
-    strcpy(app_name, "");
+    safe_strcpy(name, "");
+    safe_strcpy(app_name, "");
     version_num = 0;
     command_line = "";
     //strcpy(env_vars, "");
diff --git a/client/client_types.h b/client/client_types.h
index 9cf9235..5367f3d 100644
--- a/client/client_types.h
+++ b/client/client_types.h
@@ -32,6 +32,7 @@
 #endif
 
 #include "cc_config.h"
+#include "str_replace.h"
 #include "common_defs.h"
 #include "coproc.h"
 #include "cert_sig.h"
@@ -367,8 +368,8 @@ struct WORKUNIT {
     double rsc_disk_bound;
 
     WORKUNIT(){
-      strcpy(name, "");
-      strcpy(app_name, "");
+      safe_strcpy(name, "");
+      safe_strcpy(app_name, "");
       version_num = 0;
       command_line = "";
       input_files.clear();
diff --git a/client/cs_account.cpp b/client/cs_account.cpp
index 4539c79..85fe08b 100644
--- a/client/cs_account.cpp
+++ b/client/cs_account.cpp
@@ -59,7 +59,7 @@ int PROJECT::write_account_file() {
     FILE* f;
     int retval;
 
-    get_account_filename(master_url, path);
+    get_account_filename(master_url, path, sizeof(path));
     f = boinc_fopen(TEMP_ACCT_FILE_NAME, "w");
     if (!f) return ERR_FOPEN;
 
@@ -109,8 +109,8 @@ int PROJECT::parse_account(FILE* in) {
     XML_PARSER xp(&mf);
     mf.init_file(in);
 
-    strcpy(master_url, "");
-    strcpy(authenticator, "");
+    safe_strcpy(master_url, "");
+    safe_strcpy(authenticator, "");
     while (!xp.get_tag()) {
         if (xp.match_tag("account")) continue;
         if (xp.match_tag("project_preferences")) {
@@ -202,7 +202,7 @@ int PROJECT::parse_account_file_venue() {
     bool in_right_venue = false, btemp;
     double dtemp;
 
-    get_account_filename(master_url, path);
+    get_account_filename(master_url, path, sizeof(path));
     FILE* in = boinc_fopen(path, "r");
     if (!in) return ERR_FOPEN;
 
@@ -291,7 +291,7 @@ int PROJECT::parse_account_file() {
     int retval;
     FILE* f;
 
-    get_account_filename(master_url, path);
+    get_account_filename(master_url, path, sizeof(path));
     f = boinc_fopen(path, "r");
     if (!f) return ERR_FOPEN;
     retval = parse_account(f);
@@ -464,7 +464,7 @@ int PROJECT::write_statistics_file() {
     FILE* f;
     int retval;
 
-    get_statistics_filename(master_url, path);
+    get_statistics_filename(master_url, path, sizeof(path));
     f = boinc_fopen(TEMP_STATS_FILE_NAME, "w");
     if (!f) return ERR_FOPEN;
     fprintf(f, 
@@ -551,7 +551,7 @@ int CLIENT_STATE::add_project(
         return retval;
     }
 
-    get_account_filename(canonical_master_url, path);
+    get_account_filename(canonical_master_url, path, sizeof(path));
     f = boinc_fopen(path, "r");
     if (!f) {
         delete project;
diff --git a/client/cs_benchmark.cpp b/client/cs_benchmark.cpp
index 85a1aa6..f185df4 100644
--- a/client/cs_benchmark.cpp
+++ b/client/cs_benchmark.cpp
@@ -54,6 +54,10 @@
 #include <ctime>
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #include "error_numbers.h"
 #include "file_names.h"
 #include "filesys.h"
@@ -190,7 +194,7 @@ int cpu_benchmarks(BENCHMARK_DESC* bdp) {
 #endif
     if (retval) {
         bdp->error = true;
-        sprintf(bdp->error_str, "FP benchmark ran only %f sec; ignoring", fp_time);
+        snprintf(bdp->error_str, sizeof(bdp->error_str), "FP benchmark ran only %f sec; ignoring", fp_time);
         return 0;
     }
 #ifdef _WIN32
@@ -204,7 +208,7 @@ int cpu_benchmarks(BENCHMARK_DESC* bdp) {
     retval = dhrystone(vax_mips, int_loops, int_time, MIN_CPU_TIME);
     if (retval) {
         bdp->error = true;
-        sprintf(bdp->error_str, "Integer benchmark ran only %f sec; ignoring", int_time);
+        snprintf(bdp->error_str, sizeof(bdp->error_str), "Integer benchmark ran only %f sec; ignoring", int_time);
         return 0;
     }
     host_info.p_iops = vax_mips*1e6;
diff --git a/client/cs_files.cpp b/client/cs_files.cpp
index 76b6c01..e757238 100644
--- a/client/cs_files.cpp
+++ b/client/cs_files.cpp
@@ -30,8 +30,13 @@
 #include <sys/types.h>
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #include "md5_file.h"
 #include "crypt.h"
+#include "str_replace.h"
 #include "str_util.h"
 #include "filesys.h"
 #include "cert_sig.h"
@@ -181,13 +186,13 @@ int FILE_INFO::verify_file(
 
     get_pathname(this, pathname, sizeof(pathname));
 
-    strcpy(cksum, "");
+    safe_strcpy(cksum, "");
 
     // see if we need to unzip it
     //
     if (download_gzipped && !boinc_file_exists(pathname)) {
         char gzpath[MAXPATHLEN];
-        sprintf(gzpath, "%s.gz", pathname);
+        snprintf(gzpath, sizeof(gzpath), "%s.gz", pathname);
         if (boinc_file_exists(gzpath) ) {
             if (allow_async && nbytes > ASYNC_FILE_THRESHOLD) {
                 ASYNC_VERIFY* avp = new ASYNC_VERIFY;
@@ -202,7 +207,7 @@ int FILE_INFO::verify_file(
             retval = gunzip(cksum);
             if (retval) return retval;
         } else {
-            strcat(gzpath, "t");
+            safe_strcat(gzpath, "t");
             if (!boinc_file_exists(gzpath)) {
                 status = FILE_NOT_PRESENT;
             }
@@ -413,8 +418,8 @@ bool CLIENT_STATE::create_and_delete_pers_file_xfers() {
                 if (fip->download_gzipped) {
                     char path[MAXPATHLEN], from_path[MAXPATHLEN], to_path[MAXPATHLEN];
                     get_pathname(fip, path, sizeof(path));
-                    sprintf(from_path, "%s.gzt", path);
-                    sprintf(to_path, "%s.gz", path);
+                    snprintf(from_path, sizeof(from_path), "%s.gzt", path);
+                    snprintf(to_path, sizeof(to_path), "%s.gz", path);
                     boinc_rename(from_path, to_path);
                 }
 
diff --git a/client/cs_notice.cpp b/client/cs_notice.cpp
index f95a258..6a34950 100644
--- a/client/cs_notice.cpp
+++ b/client/cs_notice.cpp
@@ -24,6 +24,10 @@
 #include <string>
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #include "parse.h"
 #include "url.h"
 #include "filesys.h"
@@ -52,10 +56,10 @@ static bool cmp(NOTICE n1, NOTICE n2) {
     return (strcmp(n1.guid, n2.guid) > 0);
 }
 
-static void project_feed_list_file_name(PROJ_AM* p, char* buf) {
+static void project_feed_list_file_name(PROJ_AM* p, char* buf, int len) {
     char url[256];
     escape_project_url(p->master_url, url);
-    sprintf(buf, "notices/feeds_%s.xml", url);
+    snprintf(buf, len, "notices/feeds_%s.xml", url);
 }
 
 // parse feed descs from scheduler reply or feed list file
@@ -95,7 +99,7 @@ static void write_rss_feed_descs(MIOFILE& fout, vector<RSS_FEED>& feeds) {
 
 static void write_project_feed_list(PROJ_AM* p) {
     char buf[256];
-    project_feed_list_file_name(p, buf);
+    project_feed_list_file_name(p, buf, sizeof(buf));
     FILE* f = fopen(buf, "w");
     if (!f) return;
     MIOFILE fout;
@@ -496,7 +500,7 @@ void NOTICES::write_archive(RSS_FEED* rfp) {
     char path[MAXPATHLEN];
 
     if (rfp) {
-        rfp->archive_file_name(path);
+        rfp->archive_file_name(path, sizeof(path));
     } else {
         safe_strcpy(path, NOTICES_DIR"/archive.xml");
     }
@@ -609,16 +613,16 @@ void NOTICES::write(int seqno, GUI_RPC_CONN& grc, bool public_only) {
 
 ///////////// RSS_FEED ////////////////
 
-void RSS_FEED::feed_file_name(char* path) {
+void RSS_FEED::feed_file_name(char* path, int len) {
     char buf[256];
     escape_project_url(url_base, buf);
-    sprintf(path, NOTICES_DIR"/%s.xml", buf);
+    snprintf(path, len, NOTICES_DIR"/%s.xml", buf);
 }
 
-void RSS_FEED::archive_file_name(char* path) {
+void RSS_FEED::archive_file_name(char* path, int len) {
     char buf[256];
     escape_project_url(url_base, buf);
-    sprintf(path, NOTICES_DIR"/archive_%s.xml", buf);
+    snprintf(path, len, NOTICES_DIR"/archive_%s.xml", buf);
 }
 
 // read and parse the contents of the archive file;
@@ -626,14 +630,14 @@ void RSS_FEED::archive_file_name(char* path) {
 //
 int RSS_FEED::read_archive_file() {
     char path[MAXPATHLEN];
-    archive_file_name(path);
+    archive_file_name(path, sizeof(path));
     return notices.read_archive_file(path, this);
 }
 
 // parse a feed descriptor (in scheduler reply or feed list file)
 //
 int RSS_FEED::parse_desc(XML_PARSER& xp) {
-    strcpy(url, "");
+    safe_strcpy(url, "");
     poll_interval = 0;
     next_poll_time = 0;
     while (!xp.get_tag()) {
@@ -752,9 +756,9 @@ int RSS_FEED::parse_items(XML_PARSER& xp, int& nitems) {
 
 void RSS_FEED::delete_files() {
     char path[MAXPATHLEN];
-    feed_file_name(path);
+    feed_file_name(path, sizeof(path));
     boinc_delete_file(path);
-    archive_file_name(path);
+    archive_file_name(path, sizeof(path));
     boinc_delete_file(path);
 }
 
@@ -770,14 +774,14 @@ RSS_FEED_OP::RSS_FEED_OP() {
 //
 bool RSS_FEED_OP::poll() {
     unsigned int i;
+    char file_name[256];
     if (gstate.gui_http.is_busy()) return false;
     if (gstate.network_suspended) return false;
     for (i=0; i<rss_feeds.feeds.size(); i++) {
         RSS_FEED& rf = rss_feeds.feeds[i];
         if (gstate.now > rf.next_poll_time) {
             rf.next_poll_time = gstate.now + rf.poll_interval;
-            char filename[256];
-            rf.feed_file_name(filename);
+            rf.feed_file_name(file_name, sizeof(file_name));
             rfp = &rf;
             if (log_flags.notice_debug) {
                 msg_printf(0, MSG_INFO,
@@ -785,8 +789,8 @@ bool RSS_FEED_OP::poll() {
                 );
             }
             char url[1024];
-            strcpy(url, rf.url);
-            gstate.gui_http.do_rpc(this, url, filename, true);
+            safe_strcpy(url, rf.url);
+            gstate.gui_http.do_rpc(this, url, file_name, true);
             break;
         }
     }
@@ -796,7 +800,7 @@ bool RSS_FEED_OP::poll() {
 // handle a completed RSS feed fetch
 //
 void RSS_FEED_OP::handle_reply(int http_op_retval) {
-    char filename[256];
+    char file_name[256];
     int nitems;
 
     if (!rfp) return;   // op was canceled
@@ -816,11 +820,11 @@ void RSS_FEED_OP::handle_reply(int http_op_retval) {
         );
     }
 
-    rfp->feed_file_name(filename);
-    FILE* f = fopen(filename, "r");
+    rfp->feed_file_name(file_name, sizeof(file_name));
+    FILE* f = fopen(file_name, "r");
     if (!f) {
         msg_printf(0, MSG_INTERNAL_ERROR,
-            "RSS feed file '%s' not found", filename
+            "RSS feed file '%s' not found", file_name
         );
         return;
     }
@@ -847,7 +851,7 @@ static void init_proj_am(PROJ_AM* p) {
     MIOFILE fin;
     char path[MAXPATHLEN];
 
-    project_feed_list_file_name(p, path);
+    project_feed_list_file_name(p, path, sizeof(path));
     f = fopen(path, "r");
     if (f) {
         fin.init_file(f);
@@ -987,6 +991,6 @@ void RSS_FEEDS::write_feed_list() {
 
 void delete_project_notice_files(PROJECT* p) {
     char path[MAXPATHLEN];
-    project_feed_list_file_name(p, path);
+    project_feed_list_file_name(p, path, sizeof(path));
     boinc_delete_file(path);
 }
diff --git a/client/cs_notice.h b/client/cs_notice.h
index 8d6384f..d6efe05 100644
--- a/client/cs_notice.h
+++ b/client/cs_notice.h
@@ -114,8 +114,8 @@ struct RSS_FEED {
     void write(MIOFILE&);
     int parse_desc(XML_PARSER&);
     int parse_items(XML_PARSER&, int&);
-    void feed_file_name(char*);
-    void archive_file_name(char*);
+    void feed_file_name(char*, int);
+    void archive_file_name(char*, int);
     int read_archive_file();
     void delete_files();
 };
diff --git a/client/cs_scheduler.cpp b/client/cs_scheduler.cpp
index 5e33461..3bf6959 100644
--- a/client/cs_scheduler.cpp
+++ b/client/cs_scheduler.cpp
@@ -34,6 +34,10 @@
 #include <set>
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #include "crypt.h"
 #include "error_numbers.h"
 #include "file_names.h"
@@ -330,21 +334,21 @@ int CLIENT_STATE::make_scheduler_request(PROJECT* p) {
             rp = results[i];
             double x = rp->estimated_runtime_remaining();
             if (x == 0) continue;
-            strcpy(buf, "");
+            safe_strcpy(buf, "");
             int rt = rp->avp->gpu_usage.rsc_type;
             if (rt) {
                 if (rt == rsc_index(GPU_TYPE_NVIDIA)) {
-                    sprintf(buf,
+                    snprintf(buf, sizeof(buf),
                         "        <ncudas>%f</ncudas>\n",
                         rp->avp->gpu_usage.usage
                     );
                 } else if (rt == rsc_index(GPU_TYPE_ATI)) {
-                    sprintf(buf,
+                    snprintf(buf, sizeof(buf),
                         "        <natis>%f</natis>\n",
                         rp->avp->gpu_usage.usage
                     );
                 } else if (rt == rsc_index(GPU_TYPE_INTEL)) {
-                    sprintf(buf,
+                    snprintf(buf, sizeof(buf),
                         "        <nintel_gpus>%f</nintel_gpus>\n",
                         rp->avp->gpu_usage.usage
                     );
@@ -573,9 +577,9 @@ int CLIENT_STATE::handle_scheduler_reply(
 
     if (log_flags.sched_ops) {
         if (work_fetch.requested_work()) {
-            sprintf(buf, ": got %d new tasks", (int)sr.results.size());
+            snprintf(buf, sizeof(buf), ": got %d new tasks", (int)sr.results.size());
         } else {
-            strcpy(buf, "");
+            safe_strcpy(buf, "");
         }
         msg_printf(project, MSG_INFO, "Scheduler request completed%s", buf);
     }
@@ -1151,7 +1155,7 @@ void CLIENT_STATE::check_project_timeout() {
         if (p->possibly_backed_off && now > p->min_rpc_time) {
             p->possibly_backed_off = false;
             char buf[256];
-            sprintf(buf, "Backoff ended for %s", p->get_project_name());
+            snprintf(buf, sizeof(buf), "Backoff ended for %s", p->get_project_name());
             request_work_fetch(buf);
         }
     }
diff --git a/client/cs_statefile.cpp b/client/cs_statefile.cpp
index 2c8c764..cf3c4fa 100644
--- a/client/cs_statefile.cpp
+++ b/client/cs_statefile.cpp
@@ -24,6 +24,10 @@
 #include <errno.h>
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #include "error_numbers.h"
 #include "filesys.h"
 #include "md5_file.h"
@@ -823,7 +827,7 @@ void CLIENT_STATE::check_anonymous() {
 
     for (i=0; i<projects.size(); i++) {
         PROJECT* p = projects[i];
-        sprintf(path, "%s/%s", p->project_dir(), APP_INFO_FILE_NAME);
+        snprintf(path, sizeof(path), "%s/%s", p->project_dir(), APP_INFO_FILE_NAME);
         f = fopen(path, "r");
         if (!f) continue;
         msg_printf(p, MSG_INFO,
@@ -883,7 +887,7 @@ int CLIENT_STATE::parse_app_info(PROJECT* p, FILE* in) {
                 safe_strcpy(buf,
                     _("File referenced in app_info.xml does not exist: ")
                 );
-                strcat(buf, fip->name);
+                safe_strcat(buf, fip->name);
                 msg_printf(p, MSG_USER_ALERT, "%s", buf);
                 delete fip;
                 continue;
diff --git a/client/cs_trickle.cpp b/client/cs_trickle.cpp
index 2a85966..e78d4a2 100644
--- a/client/cs_trickle.cpp
+++ b/client/cs_trickle.cpp
@@ -27,6 +27,10 @@
 #include <cstring>
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #include "error_numbers.h"
 #include "file_names.h"
 #include "filesys.h"
@@ -68,7 +72,7 @@ int CLIENT_STATE::read_trickle_files(PROJECT* project, FILE* f) {
         *p = '_';
         t = atoi(p+1);
 
-        sprintf(path, "%s/%s", project->project_dir(), fname);
+        snprintf(path, sizeof(path), "%s/%s", project->project_dir(), fname);
         retval = read_file_malloc(path, file_contents);
         if (retval) {
             if (log_flags.trickle_debug) {
@@ -99,7 +103,7 @@ int CLIENT_STATE::read_trickle_files(PROJECT* project, FILE* f) {
         // append .sent to filename, so we'll know which ones to delete later
         //
         if (!ends_with(fname, ".sent")) {
-            sprintf(newpath, "%s/%s.sent", project->project_dir(), fname);
+            snprintf(newpath, sizeof(newpath), "%s/%s.sent", project->project_dir(), fname);
             boinc_rename(path, newpath);
         }
     }
@@ -120,7 +124,7 @@ int CLIENT_STATE::remove_trickle_files(PROJECT* project) {
         safe_strcpy(fname, fn.c_str());
         if (!starts_with(fname, "trickle_up")) continue;
         if (!ends_with(fname, ".sent")) continue;
-        sprintf(path, "%s/%s", project->project_dir(), fname);
+        snprintf(path, sizeof(path), "%s/%s", project->project_dir(), fname);
         delete_project_owned_file(path, true);
     }
     return 0;
@@ -144,7 +148,7 @@ int CLIENT_STATE::handle_trickle_down(PROJECT* project, FILE* in) {
             if (!rp) return ERR_NULL;
             ACTIVE_TASK* atp = lookup_active_task_by_result(rp);
             if (!atp) return ERR_NULL;
-            sprintf(path, "%s/trickle_down_%d", atp->slot_dir, send_time);
+            snprintf(path, sizeof(path), "%s/trickle_down_%d", atp->slot_dir, send_time);
             FILE* f = fopen(path, "w");
             if (!f) return ERR_FOPEN;
             fputs(body.c_str(), f);
@@ -177,9 +181,9 @@ bool trickle_up_poll() {
 }
 
 static void trickle_up_request_message(
-    PROJECT* p, const char* msg, char* result_name, int t, char* buf
+    PROJECT* p, const char* msg, char* result_name, int t, char* buf, int len
 ) {
-    sprintf(buf,
+    snprintf(buf, len,
         "<scheduler_request>\n"
         "    <authenticator>%s</authenticator>\n"
         "    <hostid>%d</hostid>\n"
@@ -212,9 +216,10 @@ void send_replicated_trickles(
     PROJECT* p, const char* msg, char* result_name, int now
 ) {
     if (!p->trickle_up_ops.size()) return;
-    char *buf = (char*)malloc(strlen(msg) + 4096);
+    int trickle_len = strlen(msg) + 4096;
+    char *buf = (char*)malloc(trickle_len);
     if (!buf) return;
-    trickle_up_request_message(p, msg, result_name, now, buf);
+    trickle_up_request_message(p, msg, result_name, now, buf, trickle_len);
     for (unsigned int i=0; i<p->trickle_up_ops.size(); i++) {
         TRICKLE_UP_OP *t = p->trickle_up_ops[i];
         if (t->gui_http->is_busy()) {
@@ -286,7 +291,7 @@ int TRICKLE_UP_OP::do_rpc(const char* msg) {
     int n = (int)strlen(msg)+1;
     if (n<65536) n = 65536;     // make it big enough to handle the reply
     req_buf = (char*)malloc(n);
-    strcpy(req_buf, msg);
+    strlcpy(req_buf, msg, n);
     int retval = gui_http->do_rpc_post_str(
         this, const_cast<char*>(url.c_str()), req_buf, n
     );
diff --git a/client/file_names.cpp b/client/file_names.cpp
index 37deafd..4e3b16f 100644
--- a/client/file_names.cpp
+++ b/client/file_names.cpp
@@ -82,7 +82,7 @@ void get_pathname(FILE_INFO* fip, char* path, int len) {
             strcpy(buf, p->project_dir());
         }
 #else
-        strcpy(buf, p->project_dir());
+        safe_strcpy(buf, p->project_dir());
 #endif
         snprintf(path, len, "%s/%s", buf, fip->name);
     } else {
@@ -227,7 +227,7 @@ void delete_old_slot_dirs() {
     dirp = dir_open(SLOTS_DIR);
     if (!dirp) return;
     while (1) {
-        strcpy(filename, "");
+        safe_strcpy(filename, "");
         retval = dir_scan(filename, dirp, sizeof(filename));
         if (retval) break;
         snprintf(path, sizeof(path), "%s/%s", SLOTS_DIR, filename);
@@ -261,10 +261,10 @@ void delete_old_slot_dirs() {
     dir_close(dirp);
 }
 
-void get_account_filename(char* master_url, char* path) {
+void get_account_filename(char* master_url, char* path, int len) {
     char buf[1024];
     escape_project_url(master_url, buf);
-    sprintf(path, "account_%s.xml", buf);
+    snprintf(path, len, "account_%s.xml", buf);
 }
 
 static bool bad_account_filename(const char* filename) {
@@ -315,10 +315,10 @@ bool is_statistics_file(const char* filename) {
     return true;
 }
 
-void get_statistics_filename(char* master_url, char* path) {
+void get_statistics_filename(char* master_url, char* path, int len) {
     char buf[256];
     escape_project_url(master_url, buf);
-    sprintf(path, "statistics_%s.xml", buf);
+    snprintf(path, len, "statistics_%s.xml", buf);
 }
 
 bool is_image_file(const char* filename) {
diff --git a/client/file_names.h b/client/file_names.h
index 3bbb8a5..ec27a6d 100644
--- a/client/file_names.h
+++ b/client/file_names.h
@@ -37,10 +37,10 @@ extern int make_project_dir(PROJECT&);
 extern int remove_project_dir(PROJECT&);
 extern int make_slot_dir(int);
 extern void delete_old_slot_dirs();
-extern void get_account_filename(char* master_url, char* path);
+extern void get_account_filename(char* master_url, char* path, int len);
 extern bool is_account_file(const char*);
 extern bool is_statistics_file(const char*);
-extern void get_statistics_filename(char* master_url, char* path);
+extern void get_statistics_filename(char* master_url, char* path, int len);
 extern bool is_image_file(const char*);
 
 extern void get_sched_request_filename(PROJECT&, char*, int len);
diff --git a/client/file_xfer.cpp b/client/file_xfer.cpp
index 36017a5..08b1a85 100644
--- a/client/file_xfer.cpp
+++ b/client/file_xfer.cpp
@@ -23,7 +23,12 @@
 #include "config.h"
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #include "error_numbers.h"
+#include "str_replace.h"
 #include "file_names.h"
 #include "filesys.h"
 #include "parse.h"
@@ -40,8 +45,8 @@ FILE_XFER::FILE_XFER() {
     file_xfer_done = false;
     file_xfer_retval = 0;
     fip = NULL;
-    strcpy(pathname, "");
-    strcpy(header, "");
+    safe_strcpy(pathname, "");
+    safe_strcpy(header, "");
     file_size_query = false;
     is_upload = false;
     starting_size = 0.0;
@@ -58,7 +63,7 @@ int FILE_XFER::init_download(FILE_INFO& file_info) {
     fip = &file_info;
     get_pathname(fip, pathname, sizeof(pathname));
     if (fip->download_gzipped) {
-        strcat(pathname, ".gzt");
+        safe_strcat(pathname, ".gzt");
     }
 
     // if file is already as large or larger than it's supposed to be,
@@ -105,7 +110,7 @@ int FILE_XFER::init_upload(FILE_INFO& file_info) {
     }
     if (file_info.upload_offset < 0) {
         bytes_xferred = 0;
-        sprintf(header,
+        snprintf(header, sizeof(header), 
             "<data_server_request>\n"
             "    <core_client_major_version>%d</core_client_major_version>\n"
             "    <core_client_minor_version>%d</core_client_minor_version>\n"
@@ -123,7 +128,7 @@ int FILE_XFER::init_upload(FILE_INFO& file_info) {
         );
     } else {
         bytes_xferred = file_info.upload_offset;
-        sprintf(header,
+        snprintf(header, sizeof(header), 
             "<data_server_request>\n"
             "    <core_client_major_version>%d</core_client_major_version>\n"
             "    <core_client_minor_version>%d</core_client_minor_version>\n"
diff --git a/client/gpu_amd.cpp b/client/gpu_amd.cpp
index 60be4c9..966ddb0 100644
--- a/client/gpu_amd.cpp
+++ b/client/gpu_amd.cpp
@@ -160,7 +160,7 @@ void COPROC_ATI::get(
 
     void* callib = dlopen("libaticalrt.so", RTLD_NOW);
     if (!callib) {
-        sprintf(buf, "ATI: %s", dlerror());
+        snprintf(buf, sizeof(buf), "ATI: %s", dlerror());
         warnings.push_back(buf);
         return;
     }
@@ -202,19 +202,19 @@ void COPROC_ATI::get(
 
     retval = (*__calInit)();
     if (retval != CAL_RESULT_OK) {
-        sprintf(buf, "calInit() returned %d", retval);
+        snprintf(buf, sizeof(buf), "calInit() returned %d", retval);
         warnings.push_back(buf);
         goto leave;
     }
     retval = (*__calDeviceGetCount)(&numDevices);
     if (retval != CAL_RESULT_OK) {
-        sprintf(buf, "calDeviceGetCount() returned %d", retval);
+        snprintf(buf, sizeof(buf), "calDeviceGetCount() returned %d", retval);
         warnings.push_back(buf);
         goto leave;
     }
     retval = (*__calGetVersion)(&cal_major, &cal_minor, &cal_imp);
     if (retval != CAL_RESULT_OK) {
-        sprintf(buf, "calGetVersion() returned %d", retval);
+        snprintf(buf, sizeof(buf), "calGetVersion() returned %d", retval);
         warnings.push_back(buf);
         goto leave;
     }
@@ -227,13 +227,13 @@ void COPROC_ATI::get(
     for (CALuint i=0; i<numDevices; i++) {
         retval = (*__calDeviceGetInfo)(&info, i);
         if (retval != CAL_RESULT_OK) {
-            sprintf(buf, "calDeviceGetInfo() returned %d", retval);
+            snprintf(buf, sizeof(buf), "calDeviceGetInfo() returned %d", retval);
             warnings.push_back(buf);
             goto leave;
         }
         retval = (*__calDeviceGetAttribs)(&attribs, i);
         if (retval != CAL_RESULT_OK) {
-            sprintf(buf, "calDeviceGetAttribs() returned %d", retval);
+            snprintf(buf, sizeof(buf), "calDeviceGetAttribs() returned %d", retval);
             warnings.push_back(buf);
             goto leave;
         }
@@ -372,7 +372,7 @@ void COPROC_ATI::get(
         cc.attribs = attribs;
         cc.info = info;
         safe_strcpy(cc.name, gpu_name.c_str());
-        sprintf(cc.version, "%d.%d.%d", cal_major, cal_minor, cal_imp);
+        snprintf(cc.version, sizeof(cc.version), "%d.%d.%d", cal_major, cal_minor, cal_imp);
         cc.amdrt_detected = amdrt_detected;
         cc.atirt_detected = atirt_detected;
         cc.device_num = i;
diff --git a/client/gui_rpc_server.cpp b/client/gui_rpc_server.cpp
index ba9740c..96e21a9 100644
--- a/client/gui_rpc_server.cpp
+++ b/client/gui_rpc_server.cpp
@@ -78,9 +78,9 @@ GUI_RPC_CONN::GUI_RPC_CONN(int s) :
 {
     sock = s;
     mfout.init_mfile(&mout);
-    strcpy(request_msg,"");
+    safe_strcpy(request_msg,"");
     request_nbytes = 0;
-    strcpy(nonce,"");
+    safe_strcpy(nonce,"");
     auth_needed = false;
     got_auth1 = false;
     got_auth2 = false;
@@ -101,7 +101,7 @@ GUI_RPC_CONN_SET::GUI_RPC_CONN_SET() {
     remote_hosts_file_exists = false;
     lsock = -1;
     time_of_last_rpc_needing_network = 0;
-    strcpy(password,"");
+    safe_strcpy(password,"");
 }
 
 bool GUI_RPC_CONN_SET::poll() {
@@ -125,7 +125,7 @@ bool GUI_RPC_CONN_SET::recent_rpc_needs_network(double interval) {
 void GUI_RPC_CONN_SET::get_password() {
     int retval;
 
-    strcpy(password, "");
+    safe_strcpy(password, "");
     FILE* f = fopen(GUI_RPC_PASSWD_FILE, "r");
     if (f) {
         if (fgets(password, 256, f)) {
diff --git a/client/gui_rpc_server_ops.cpp b/client/gui_rpc_server_ops.cpp
index f20aee2..f0d1f33 100644
--- a/client/gui_rpc_server_ops.cpp
+++ b/client/gui_rpc_server_ops.cpp
@@ -50,6 +50,10 @@
 #endif
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #include "error_numbers.h"
 #include "filesys.h"
 #include "network.h"
@@ -86,7 +90,7 @@ int GUI_RPC_CONN::handle_auth2(char* buf, MIOFILE& fout) {
         auth_failure(fout);
         return ERR_AUTHENTICATOR;
     }
-    sprintf(buf2, "%s%s", nonce, gstate.gui_rpcs.password);
+    snprintf(buf2, sizeof(buf2), "%s%s", nonce, gstate.gui_rpcs.password);
     md5_block((const unsigned char*)buf2, (int)strlen(buf2), nonce_hash_correct);
     if (strcmp(nonce_hash, nonce_hash_correct)) {
         auth_failure(fout);
@@ -549,7 +553,7 @@ static void handle_result_op(GUI_RPC_CONN& grc, const char* op) {
     ACTIVE_TASK* atp;
     string project_url;
 
-    strcpy(result_name, "");
+    safe_strcpy(result_name, "");
     while (!grc.xp.get_tag()) {
         if (grc.xp.parse_str("name", result_name, sizeof(result_name))) continue;
         if (grc.xp.parse_string("project_url", project_url)) continue;
@@ -779,7 +783,7 @@ void handle_lookup_account(GUI_RPC_CONN& grc) {
     MIOFILE in;
 
     ai.parse(grc.xp);
-	if ((!ai.url.size() || !ai.email_addr.size() || !ai.passwd_hash.size()) && !ai.server_assigned_hash) {
+	if ((!ai.url.size() || !ai.email_addr.size() || !ai.passwd_hash.size()) && !ai.server_assigned_cookie) {
         grc.mfout.printf("<error>missing URL, email address, or password</error>\n");
         return;
     }
@@ -1224,7 +1228,7 @@ static void handle_report_device_status(GUI_RPC_CONN& grc) {
                 //
                 if (strlen(d.device_name)) {
                     if (strcmp(d.device_name, gstate.host_info.domain_name)) {
-                        strcpy(gstate.host_info.domain_name, d.device_name);
+                        safe_strcpy(gstate.host_info.domain_name, d.device_name);
                         gstate.set_client_state_dirty("Device name changed");
                     }
                 }
@@ -1280,7 +1284,7 @@ struct GUI_RPC {
     GUI_RPC(const char* req, GUI_RPC_HANDLER h, bool ar, bool en, bool ro) {
         req_tag = req;
         safe_strcpy(alt_req_tag, req);
-        strcat(alt_req_tag, "/");
+        safe_strcat(alt_req_tag, "/");
         handler = h;
         auth_required = ar;
         enable_network = en;
@@ -1429,7 +1433,8 @@ int GUI_RPC_CONN::handle_rpc() {
     request_msg[request_nbytes] = 0;
     if (!strncmp(request_msg, "OPTIONS", 7)) {
         char buf[1024];
-        sprintf(buf, "HTTP/1.1 200 OK\n"
+        snprintf(buf, sizeof(buf),
+            "HTTP/1.1 200 OK\n"
             "Server: BOINC client\n"
             "Access-Control-Allow-Origin: *\n"
             "Access-Control-Allow-Methods: POST, GET, OPTIONS\n"
@@ -1505,7 +1510,7 @@ int GUI_RPC_CONN::handle_rpc() {
     mout.get_buf(p, n);
     if (http_request) {
         char buf[1024];
-        sprintf(buf,
+        snprintf(buf, sizeof(buf),
             "HTTP/1.1 200 OK\n"
             "Date: Fri, 31 Dec 1999 23:59:59 GMT\n"
             "Server: BOINC client\n"
diff --git a/client/hostinfo_network.cpp b/client/hostinfo_network.cpp
index f672250..c8877da 100644
--- a/client/hostinfo_network.cpp
+++ b/client/hostinfo_network.cpp
@@ -41,6 +41,10 @@
 #endif
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #ifdef __APPLE__
 #include <Carbon/Carbon.h>
 #endif
@@ -61,20 +65,20 @@
 // Android: if domain_name is empty, set it to android_xxxxxxxx
 //
 int HOST_INFO::get_local_network_info() {
-    strcpy(ip_addr, "");
+    safe_strcpy(ip_addr, "");
 
 #ifdef ANDROID
     if (strlen(domain_name) && strcmp(domain_name, "localhost")) return 0;
     char buf[256];
     make_random_string("", buf);
     buf[8] = 0;
-    sprintf(domain_name, "android_%s", buf);
+    snprintf(domain_name, sizeof(domain_name), "android_%s", buf);
     return 0;
 #endif
 
     struct sockaddr_storage s;
     
-    strcpy(domain_name, "");
+    safe_strcpy(domain_name, "");
 
     // it seems like we should use getdomainname() instead of gethostname(),
     // but on FC6 it returns "(none)".
@@ -107,11 +111,13 @@ void HOST_INFO::make_random_string(const char* salt, char* out) {
     char buf[1024];
 
 #ifdef ANDROID
-    sprintf(buf, "%f%s%s%f%s",
+    snprintf(buf, sizeof(buf),
+        "%f%s%s%f%s",
         dtime(), domain_name, ip_addr, d_free, salt
     );
 #else
-    sprintf(buf, "%d%.15e%s%s%f%s",
+    snprintf(buf, sizeof(buf),
+        "%d%.15e%s%s%f%s",
         getpid(), dtime(), domain_name, ip_addr, d_free, salt
     );
 #endif
@@ -142,6 +148,6 @@ void HOST_INFO::generate_host_cpid() {
     // the instances will get different CPIDs
     //
     boinc_getcwd(dir);
-    strcat(buf, dir);
+    safe_strcat(buf, dir);
     md5_block((const unsigned char*) buf, (int)strlen(buf), host_cpid);
 }
diff --git a/client/hostinfo_win.cpp b/client/hostinfo_win.cpp
index 2a3856b..0a07f37 100644
--- a/client/hostinfo_win.cpp
+++ b/client/hostinfo_win.cpp
@@ -21,6 +21,7 @@
 
 #ifdef _MSC_VER
 #define snprintf _snprintf
+#define snprintf_s _snprintf_s
 #endif
 
 #ifdef HAVE_INTRIN_H
@@ -364,80 +365,80 @@ int get_os_information(
 
             if ( osvi.dwMajorVersion == 10 && osvi.dwMinorVersion == 0 ) {
                 if( osvi.wProductType == VER_NT_WORKSTATION ) {
-                    strcat(os_name, "Windows 10");
+                    strlcat(os_name, "Windows 10", os_name_size);
                 } else {
-                    strcat(os_name, "Windows Server 2016");
+                    strlcat(os_name, "Windows Server 2016", os_name_size);
                 }
                 pGPI( 10, 0, 0, 0, &dwType);
             }
 
             if ( osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 4 ) {
                 if( osvi.wProductType == VER_NT_WORKSTATION ) {
-                    strcat(os_name, "Windows 10 Beta");
+                    strlcat(os_name, "Windows 10 Beta", os_name_size);
                 } else {
-                    strcat(os_name, "Windows 10 Server Beta");
+                    strlcat(os_name, "Windows 10 Server Beta", os_name_size);
                 }
                 pGPI( 6, 4, 0, 0, &dwType);
             }
 
             if ( osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 3 ) {
                 if( osvi.wProductType == VER_NT_WORKSTATION ) {
-                    strcat(os_name, "Windows 8.1");
+                    strlcat(os_name, "Windows 8.1", os_name_size);
                 } else {
-                    strcat(os_name, "Windows Server 2012 R2");
+                    strlcat(os_name, "Windows Server 2012 R2", os_name_size);
                 }
                 pGPI( 6, 3, 0, 0, &dwType);
             }
 
             if ( osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 2 ) {
                 if( osvi.wProductType == VER_NT_WORKSTATION ) {
-                    strcat(os_name, "Windows 8");
+                    strlcat(os_name, "Windows 8", os_name_size);
                 } else {
-                    strcat(os_name, "Windows Server 2012");
+                    strlcat(os_name, "Windows Server 2012", os_name_size);
                 }
                 pGPI( 6, 2, 0, 0, &dwType);
             }
 
             if ( osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 1 ) {
                 if( osvi.wProductType == VER_NT_WORKSTATION ) {
-                    strcat(os_name, "Windows 7");
+                    strlcat(os_name, "Windows 7", os_name_size);
                 } else {
-                    strcat(os_name, "Windows Server 2008 \"R2\"");
+                    strlcat(os_name, "Windows Server 2008 \"R2\"", os_name_size);
                 }
                 pGPI( 6, 1, 0, 0, &dwType);
             }
 
             if ( osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 0 ) {
                 if( osvi.wProductType == VER_NT_WORKSTATION ) {
-                    strcat(os_name, "Windows Vista");
+                    strlcat(os_name, "Windows Vista", os_name_size);
                 } else {
-                    strcat(os_name, "Windows Server 2008");
+                    strlcat(os_name, "Windows Server 2008", os_name_size);
                 }
                 pGPI( 6, 0, 0, 0, &dwType);
             }
 
             if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2 ) {
                 if( osvi.wProductType == VER_NT_WORKSTATION) {
-                    strcat(os_name, "Windows XP");
+                    strlcat(os_name, "Windows XP", os_name_size);
                 } else {
                     if( GetSystemMetrics(SM_SERVERR2) ) {
-                        strcat(os_name, "Windows Server 2003 \"R2\"");
+                        strlcat(os_name, "Windows Server 2003 \"R2\"", os_name_size);
                     } else {
-                        strcat(os_name, "Windows Server 2003");
+                        strlcat(os_name, "Windows Server 2003", os_name_size);
                     }
                 }
             }
 
             if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1 ) {
-                strcat(os_name, "Windows XP");
+                strlcat(os_name, "Windows XP", os_name_size);
             }
 
             if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0 ) {
-                strcat(os_name, "Windows 2000");
+                strlcat(os_name, "Windows 2000", os_name_size);
             }
 
             if ( osvi.dwMajorVersion <= 4 ) {
-                strcat(os_name, "Windows NT");
+                strlcat(os_name, "Windows NT", os_name_size);
             }
 
             break;
@@ -445,27 +446,27 @@ int get_os_information(
         case VER_PLATFORM_WIN32_WINDOWS:
 
             if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 0) {
-                strcat(os_name, "Windows 95");
+                strlcat(os_name, "Windows 95", os_name_size);
             }
 
             if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 10) {
-                strcat( os_name, "Windows 98");
+                strlcat( os_name, "Windows 98", os_name_size);
             }
 
             if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 90) {
-                strcat( os_name, "Windows Millennium");
+                strlcat( os_name, "Windows Millennium", os_name_size);
             }
 
             break;
 
         case VER_PLATFORM_WIN32s:
 
-            strcat( os_name, "Win32s");
+            strlcat( os_name, "Win32s", os_name_size);
             break;
     }
 
 
-    snprintf( szVersion, sizeof(szVersion), ", (%.2u.%.2u.%.4u.%.2u)",
+    snprintf_s( szVersion, sizeof(szVersion), ", (%.2u.%.2u.%.4u.%.2u)",
         osvi.dwMajorVersion, osvi.dwMinorVersion, (osvi.dwBuildNumber & 0xFFFF), 0
     );
 
@@ -484,141 +485,141 @@ int get_os_information(
                     if( (osvi.dwMajorVersion >= 6) ) {
                         switch(dwType) {
                             case PRODUCT_BUSINESS:
-                                strcat(szSKU, "Business ");
+                                safe_strcat(szSKU, "Business ");
                                 break;
                             case PRODUCT_BUSINESS_N:
-                                strcat(szSKU, "Business N ");
+                                safe_strcat(szSKU, "Business N ");
                                 break;
                             case PRODUCT_CORE:
-                                strcat(szSKU, "Core ");
+                                safe_strcat(szSKU, "Core ");
                                 break;
                             case PRODUCT_CORE_ARM:
-                                strcat(szSKU, "Core ");
+                                safe_strcat(szSKU, "Core ");
                                 break;
                             case PRODUCT_CORE_COUNTRYSPECIFIC:
-                                strcat(szSKU, "Core ");  // specific W8 for China
+                                safe_strcat(szSKU, "Core ");  // specific W8 for China
                                 break;
                             case PRODUCT_CORE_N:
-                                strcat(szSKU, "Core N ");
+                                safe_strcat(szSKU, "Core N ");
                                 break;
                             case PRODUCT_EDUCATION:
-                                strcat(szSKU, "Education ");
+                                safe_strcat(szSKU, "Education ");
                                 break;
                             case PRODUCT_EDUCATION_N:
-                                strcat(szSKU, "Education N ");
+                                safe_strcat(szSKU, "Education N ");
                                 break;
                             case PRODUCT_EMBEDDED:
-                                strcat(szSKU, "Embedded Standard ");
+                                safe_strcat(szSKU, "Embedded Standard ");
                                 break;
                             case PRODUCT_ENTERPRISE:
-                                strcat(szSKU, "Enterprise ");
+                                safe_strcat(szSKU, "Enterprise ");
                                 break;
                             case PRODUCT_ENTERPRISE_E:
-                                strcat(szSKU, "Enterprise E ");
+                                safe_strcat(szSKU, "Enterprise E ");
                                 break;
                             case PRODUCT_ENTERPRISE_N:
-                                strcat(szSKU, "Enterprise N ");
+                                safe_strcat(szSKU, "Enterprise N ");
                                 break;
                             case PRODUCT_ENTERPRISE_N_EVALUATION:
-                                strcat(szSKU, "Enterprise N (Evaluation) ");
+                                safe_strcat(szSKU, "Enterprise N (Evaluation) ");
                                 break;
                             case PRODUCT_HOME_BASIC:
-                                strcat(szSKU, "Home Basic ");
+                                safe_strcat(szSKU, "Home Basic ");
                                 break;
                             case PRODUCT_HOME_BASIC_E:
-                                strcat(szSKU, "Home Basic E ");
+                                safe_strcat(szSKU, "Home Basic E ");
                                 break;
                             case PRODUCT_HOME_BASIC_N:
-                                strcat(szSKU, "Home Basic N ");
+                                safe_strcat(szSKU, "Home Basic N ");
                                 break;
                             case PRODUCT_HOME_PREMIUM:
-                                strcat(szSKU, "Home Premium ");
+                                safe_strcat(szSKU, "Home Premium ");
                                 break;
                             case PRODUCT_HOME_PREMIUM_E:
-                                strcat(szSKU, "Home Premium E ");
+                                safe_strcat(szSKU, "Home Premium E ");
                                 break;
                             case PRODUCT_HOME_PREMIUM_N:
-                                strcat(szSKU, "Home Premium N ");
+                                safe_strcat(szSKU, "Home Premium N ");
                                 break;
                             case PRODUCT_IOTUAP:
-                                strcat(szSKU, "Internet of Things ");
+                                safe_strcat(szSKU, "Internet of Things ");
                                 break;
                             case PRODUCT_PRERELEASE:
-                                strcat(szSKU, "Developer Preview ");
+                                safe_strcat(szSKU, "Developer Preview ");
                                 break;
                             case PRODUCT_PRERELEASE_N:
-                                strcat(szSKU, "Developer Preview N ");
+                                safe_strcat(szSKU, "Developer Preview N ");
                                 break;
                             case PRODUCT_PROFESSIONAL:
-                                strcat(szSKU, "Professional ");
+                                safe_strcat(szSKU, "Professional ");
                                 break;
                             case PRODUCT_PROFESSIONAL_E:
-                                strcat(szSKU, "Professional E ");
+                                safe_strcat(szSKU, "Professional E ");
                                 break;
                             case PRODUCT_PROFESSIONAL_N:
-                                strcat(szSKU, "Professional N ");
+                                safe_strcat(szSKU, "Professional N ");
                                 break;
                             case PRODUCT_PROFESSIONAL_S:
-                                strcat(szSKU, "Professional S ");
+                                safe_strcat(szSKU, "Professional S ");
                                 break;
                             case PRODUCT_PROFESSIONAL_S_N:
-                                strcat(szSKU, "Professional SN "); //??
+                                safe_strcat(szSKU, "Professional SN "); //??
                                 break;
                             case PRODUCT_PROFESSIONAL_WMC:
-                                strcat(szSKU, "Professional with Media Center ");
+                                safe_strcat(szSKU, "Professional with Media Center ");
                                 break;
                             case PRODUCT_STARTER:
-                                strcat(szSKU, "Starter ");
+                                safe_strcat(szSKU, "Starter ");
                                 break;
                             case PRODUCT_STARTER_E:
-                                strcat(szSKU, "Starter E ");
+                                safe_strcat(szSKU, "Starter E ");
                                 break;
                             case PRODUCT_STARTER_N:
-                                strcat(szSKU, "Starter N ");
+                                safe_strcat(szSKU, "Starter N ");
                                 break;
                             case PRODUCT_THINPC:
-                                strcat(szSKU, "ThinPC ");
+                                safe_strcat(szSKU, "ThinPC ");
                                 break;
                             case PRODUCT_ULTIMATE:
-                                strcat(szSKU, "Ultimate ");
+                                safe_strcat(szSKU, "Ultimate ");
                                 break;
                             case PRODUCT_ULTIMATE_E:
-                                strcat(szSKU, "Ultimate E ");
+                                safe_strcat(szSKU, "Ultimate E ");
                                 break;
                             case PRODUCT_ULTIMATE_N:
-                                strcat(szSKU, "Ultimate N ");
+                                safe_strcat(szSKU, "Ultimate N ");
                                 break;
                         }
 
                     } else if( (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) ) {
 
                         if( osvi.wSuiteMask & VER_SUITE_PERSONAL ) {
-                            strcat(szSKU, "Home ");
+                            safe_strcat(szSKU, "Home ");
                         } else {
-                            strcat(szSKU, "Professional ");
+                            safe_strcat(szSKU, "Professional ");
                         }
 
                     } else if( (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1) ) {
 
                         if( osvi.wSuiteMask & VER_SUITE_PERSONAL ) {
-                            strcat(szSKU, "Home ");
+                            safe_strcat(szSKU, "Home ");
                         } else if( GetSystemMetrics(SM_TABLETPC) ) {
-                            strcat(szSKU, "Tablet PC ");
+                            safe_strcat(szSKU, "Tablet PC ");
                         } else if( GetSystemMetrics(SM_MEDIACENTER) ) {
-                            strcat(szSKU, "Media Center ");
+                            safe_strcat(szSKU, "Media Center ");
                         } else if( GetSystemMetrics(SM_STARTER) ) {
-                            strcat(szSKU, "Starter ");
+                            safe_strcat(szSKU, "Starter ");
                         } else {
-                            strcat(szSKU, "Professional ");
+                            safe_strcat(szSKU, "Professional ");
                         }
 
                     } else if( (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0) ) {
 
-                        strcat(szSKU, "Professional ");
+                        safe_strcat(szSKU, "Professional ");
 
                     } else if(  (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 0) ) {
 
-                        strcat(szSKU, "Workstation ");
+                        safe_strcat(szSKU, "Workstation ");
 
                     }
                 }
@@ -630,238 +631,237 @@ int get_os_information(
                     if( (osvi.dwMajorVersion >= 6) ) {
                         switch(dwType) {
                             case PRODUCT_ARM64_SERVER:
-                                strcat(szSKU, "ARM64 Server ");
+                                safe_strcat(szSKU, "ARM64 Server ");
                                 break;
                             case PRODUCT_CLOUD_HOST_INFRASTRUCTURE_SERVER:
-                                strcat(szSKU, "Cloud Host Infrastructure Server ");
+                                safe_strcat(szSKU, "Cloud Host Infrastructure Server ");
                                 break;
                             case PRODUCT_CLOUD_STORAGE_SERVER:
-                                strcat(szSKU, "Cloud Storage Server ");
+                                safe_strcat(szSKU, "Cloud Storage Server ");
                                 break;
                             case PRODUCT_CLUSTER_SERVER:
-                                strcat(szSKU, "Cluster Server ");
+                                safe_strcat(szSKU, "Cluster Server ");
                                 break;
                             case PRODUCT_CLUSTER_SERVER_V:
-                                strcat(szSKU, "Cluster Server (without Hyper-V) ");
+                                safe_strcat(szSKU, "Cluster Server (without Hyper-V) ");
                                 break;
                             case PRODUCT_DATACENTER_EVALUATION_SERVER:
-                                strcat(szSKU, "Datacenter (Evaluation) ");
+                                safe_strcat(szSKU, "Datacenter (Evaluation) ");
                                 break;
                             case PRODUCT_DATACENTER_SERVER:
-                                strcat(szSKU, "Datacenter ");
+                                safe_strcat(szSKU, "Datacenter ");
                                 break;
                             case PRODUCT_DATACENTER_SERVER_CORE:
-                                strcat(szSKU, "Datacenter (core installation) ");
+                                safe_strcat(szSKU, "Datacenter (core installation) ");
                                 break;
                             case PRODUCT_DATACENTER_SERVER_CORE_V:
-                                strcat(szSKU, "Datacenter (core installation without Hyper-V) ");
+                                safe_strcat(szSKU, "Datacenter (core installation without Hyper-V) ");
                                 break;
                             case PRODUCT_DATACENTER_SERVER_V:
-                                strcat(szSKU, "Datacenter (without Hyper-V) ");
+                                safe_strcat(szSKU, "Datacenter (without Hyper-V) ");
                                 break;
                             case PRODUCT_ENTERPRISE_EVALUATION:
-                                strcat(szSKU, "Enterprise (Evaluation) ");
+                                safe_strcat(szSKU, "Enterprise (Evaluation) ");
                                 break;
                             case PRODUCT_ENTERPRISE_SERVER:
-                                strcat(szSKU, "Enterprise ");
+                                safe_strcat(szSKU, "Enterprise ");
                                 break;
                             case PRODUCT_ENTERPRISE_SERVER_CORE:
-                                strcat(szSKU, "Enterprise (core installation) ");
+                                safe_strcat(szSKU, "Enterprise (core installation) ");
                                 break;
                             case PRODUCT_ENTERPRISE_SERVER_CORE_V:
-                                strcat(szSKU, "Enterprise (core installation without Hyper-V) ");
+                                safe_strcat(szSKU, "Enterprise (core installation without Hyper-V) ");
                                 break;
                             case PRODUCT_ENTERPRISE_SERVER_IA64:
-                                strcat(szSKU, "Enterprise ");
+                                safe_strcat(szSKU, "Enterprise ");
                                 break;
                             case PRODUCT_ENTERPRISE_SERVER_V:
-                                strcat(szSKU, "Enterprise (without Hyper-V) ");
+                                safe_strcat(szSKU, "Enterprise (without Hyper-V) ");
                                 break;
                             case PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL:
-                                strcat(szSKU, "Essential Server Solution Additional ");
+                                safe_strcat(szSKU, "Essential Server Solution Additional ");
                                 break;
                             case PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC:
-                                strcat(szSKU, "Essential Server Solution Additional SVC ");
+                                safe_strcat(szSKU, "Essential Server Solution Additional SVC ");
                                 break;
                             case PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT:
-                                strcat(szSKU, "Essential Server Solution Management ");
+                                safe_strcat(szSKU, "Essential Server Solution Management ");
                                 break;
                             case PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC:
-                                strcat(szSKU, "Essential Server Solution Management SVC ");
+                                safe_strcat(szSKU, "Essential Server Solution Management SVC ");
                                 break;
                             case PRODUCT_HOME_PREMIUM_SERVER:
-                                strcat(szSKU, "Home Server 2011");
+                                safe_strcat(szSKU, "Home Server 2011");
                                 break;
                             case PRODUCT_HOME_SERVER:
-                                strcat(szSKU, "Storage Server Essentials ");
+                                safe_strcat(szSKU, "Storage Server Essentials ");
                                 break;
                             case PRODUCT_HYPERV:
-                                strcat(szSKU, "Hyper-V ");
+                                safe_strcat(szSKU, "Hyper-V ");
                                 break;
                             case PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT:
-                                strcat(szSKU, "Essential Business Server Management Server ");
+                                safe_strcat(szSKU, "Essential Business Server Management Server ");
                                 break;
                             case PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING:
-                                strcat(szSKU, "Essential Business Server Messaging Server ");
+                                safe_strcat(szSKU, "Essential Business Server Messaging Server ");
                                 break;
                             case PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY:
-                                strcat(szSKU, "Essential Business Server Security Server ");
+                                safe_strcat(szSKU, "Essential Business Server Security Server ");
                                 break;
                             case PRODUCT_MULTIPOINT_PREMIUM_SERVER:
-                               strcat( szSKU, "MultiPoint Server Premium ");
-                               break;
+                                safe_strcat( szSKU, "MultiPoint Server Premium ");
+                                break;
                             case PRODUCT_MULTIPOINT_STANDARD_SERVER:
-                               strcat( szSKU, "MultiPoint Server Standard ");
-                               break;
+                                safe_strcat( szSKU, "MultiPoint Server Standard ");
+                                break;
                             case PRODUCT_NANO_SERVER:
-                                strcat(szSKU, "Nano Server ");
+                                safe_strcat(szSKU, "Nano Server ");
                                 break;
                             case PRODUCT_SERVER_FOR_SMALLBUSINESS:
-                               strcat( szSKU, "Essential Server Solutions ");
-                               break;
+                                safe_strcat( szSKU, "Essential Server Solutions ");
+                                break;
                             case PRODUCT_SERVER_FOR_SMALLBUSINESS_V:
-                               strcat( szSKU, "Essential Server Solutions (without Hyper-V) ");
-                               break;
+                                safe_strcat( szSKU, "Essential Server Solutions (without Hyper-V) ");
+                                break;
                             case PRODUCT_SERVER_FOUNDATION:
-                               strcat( szSKU, "Foundation ");
-                               break;
+                                safe_strcat( szSKU, "Foundation ");
+                                break;
                             case PRODUCT_SMALLBUSINESS_SERVER:
-                               strcat( szSKU, "Small Business Server");
-                               break;
+                                safe_strcat( szSKU, "Small Business Server");
+                                break;
                             case PRODUCT_SMALLBUSINESS_SERVER_PREMIUM:
-                               strcat( szSKU, "Small Business Server Premium ");
-                               break;
+                                safe_strcat( szSKU, "Small Business Server Premium ");
+                                break;
                             case PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE:
-                               strcat( szSKU, "Small Business Server Premium (core installation) ");
-                               break;
+                                safe_strcat( szSKU, "Small Business Server Premium (core installation) ");
+                                break;
                             case PRODUCT_SOLUTION_EMBEDDEDSERVER:
-                               strcat( szSKU, "MultiPoint Server ");
-                               break;
+                                safe_strcat( szSKU, "MultiPoint Server ");
+                                break;
                             case PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE:
-                               strcat( szSKU, "MultiPoint Server (core installation) ");
-                               break;
+                                safe_strcat( szSKU, "MultiPoint Server (core installation) ");
+                                break;
                             case PRODUCT_STANDARD_EVALUATION_SERVER:
-                                strcat(szSKU, "Standard (Evaluation) ");
+                                safe_strcat(szSKU, "Standard (Evaluation) ");
                                 break;
                             case PRODUCT_STANDARD_SERVER:
-                                strcat(szSKU, "Standard ");
+                                safe_strcat(szSKU, "Standard ");
                                 break;
                             case PRODUCT_STANDARD_SERVER_CORE:
-                                strcat(szSKU, "Standard (core installation) ");
+                                safe_strcat(szSKU, "Standard (core installation) ");
                                 break;
                             case PRODUCT_STANDARD_SERVER_CORE_V:
-                                strcat(szSKU, "Standard (core installation without Hyper-V) ");
+                                safe_strcat(szSKU, "Standard (core installation without Hyper-V) ");
                                 break;
                             case PRODUCT_STANDARD_SERVER_V:
-                                strcat(szSKU, "Standard (without Hyper-V) ");
+                                safe_strcat(szSKU, "Standard (without Hyper-V) ");
                                 break;
                             case PRODUCT_STORAGE_ENTERPRISE_SERVER:
-                               strcat( szSKU, "Storage Server Enterprise ");
-                               break;
+                                safe_strcat( szSKU, "Storage Server Enterprise ");
+                                break;
                             case PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE:
-                               strcat( szSKU, "Storage Server Enterprise (core installation) ");
-                               break;
+                                safe_strcat( szSKU, "Storage Server Enterprise (core installation) ");
+                                break;
                             case PRODUCT_STORAGE_EXPRESS_SERVER:
-                               strcat( szSKU, "Storage Server Express ");
-                               break;
+                                safe_strcat( szSKU, "Storage Server Express ");
+                                break;
                             case PRODUCT_STORAGE_EXPRESS_SERVER_CORE:
-                               strcat( szSKU, "Storage Server Express (core installation) ");
-                               break;
+                                safe_strcat( szSKU, "Storage Server Express (core installation) ");
+                                break;
                             case PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER:
-                               strcat( szSKU, "Storage Server Standard (Evaluation) ");
-                               break;
+                                safe_strcat( szSKU, "Storage Server Standard (Evaluation) ");
+                                break;
                             case PRODUCT_STORAGE_STANDARD_SERVER:
-                               strcat( szSKU, "Storage Server Standard ");
-                               break;
+                                safe_strcat( szSKU, "Storage Server Standard ");
+                                break;
                             case PRODUCT_STORAGE_STANDARD_SERVER_CORE:
-                               strcat( szSKU, "Storage Server Standard (core installation) ");
-                               break;
+                                safe_strcat( szSKU, "Storage Server Standard (core installation) ");
+                                break;
                             case PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER:
-                               strcat( szSKU, "Storage Server Workgroup (Evaluation) ");
-                               break;
+                                safe_strcat( szSKU, "Storage Server Workgroup (Evaluation) ");
+                                break;
                             case PRODUCT_STORAGE_WORKGROUP_SERVER:
-                               strcat( szSKU, "Storage Server Workgroup ");
-                               break;
+                                safe_strcat( szSKU, "Storage Server Workgroup ");
+                                break;
                             case PRODUCT_STORAGE_WORKGROUP_SERVER_CORE:
-                               strcat( szSKU, "Storage Server Workgroup (core installation) ");
-                               break;
+                                safe_strcat( szSKU, "Storage Server Workgroup (core installation) ");
+                                break;
                             case PRODUCT_WEB_SERVER:
-                                strcat(szSKU, "Web Server ");
+                                safe_strcat(szSKU, "Web Server ");
                                 break;
                             case PRODUCT_WEB_SERVER_CORE:
-                                strcat(szSKU, "Web Server (core installation) ");
+                                safe_strcat(szSKU, "Web Server (core installation) ");
                                 break;
-
                         }
 
                     } else if( (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) ) {
 
                         if( osvi.wSuiteMask & VER_SUITE_DATACENTER ) {
-                            strcat( szSKU, "Datacenter Server " );
+                            safe_strcat( szSKU, "Datacenter Server " );
                         } else if( osvi.wSuiteMask & VER_SUITE_ENTERPRISE ) {
-                            strcat( szSKU, "Enterprise Server " );
+                            safe_strcat( szSKU, "Enterprise Server " );
                         } else if ( osvi.wSuiteMask & VER_SUITE_BLADE ) {
-                            strcat( szSKU, "Web Server " );
+                            safe_strcat( szSKU, "Web Server " );
                         } else if ( osvi.wSuiteMask & VER_SUITE_WH_SERVER ) {
-                            strcat( szSKU, "Home Server " );
+                            safe_strcat( szSKU, "Home Server " );
                         } else {
-                            strcat( szSKU, "Standard Server " );
+                            safe_strcat( szSKU, "Standard Server " );
                         }
 
                     } else if( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0 ) {
 
                         if( osvi.wSuiteMask & VER_SUITE_DATACENTER ) {
-                            strcat( szSKU, "Datacenter Server " );
+                            safe_strcat( szSKU, "Datacenter Server " );
                         } else if( osvi.wSuiteMask & VER_SUITE_ENTERPRISE ) {
-                            strcat( szSKU, "Advanced Server " );
+                            safe_strcat( szSKU, "Advanced Server " );
                         } else {
-                            strcat( szSKU, "Standard Server " );
+                            safe_strcat( szSKU, "Standard Server " );
                         }
 
                     } else { // Windows NT 4.0
                         if( osvi.wSuiteMask & VER_SUITE_ENTERPRISE ) {
-                            strcat( szSKU, "Enterprise Server " );
+                            safe_strcat( szSKU, "Enterprise Server " );
                         } else {
-                            strcat( szSKU, "Server " );
+                            safe_strcat( szSKU, "Server " );
                         }
                     }
                 }
 
                 switch (si.wProcessorArchitecture) {
                     case PROCESSOR_ARCHITECTURE_INTEL:
-                        strcat(szSKU, "x86 ");
+                        safe_strcat(szSKU, "x86 ");
                         break;
                     case PROCESSOR_ARCHITECTURE_MIPS:
-                        strcat(szSKU, "MIPS ");
+                        safe_strcat(szSKU, "MIPS ");
                         break;
                     case PROCESSOR_ARCHITECTURE_ALPHA:
-                        strcat(szSKU, "Alpha ");
+                        safe_strcat(szSKU, "Alpha ");
                         break;
                     case PROCESSOR_ARCHITECTURE_PPC:
-                        strcat(szSKU, "PowerPC ");
+                        safe_strcat(szSKU, "PowerPC ");
                         break;
                     case PROCESSOR_ARCHITECTURE_IA64:
-                        strcat(szSKU, "Itanium ");
+                        safe_strcat(szSKU, "Itanium ");
                         break;
                     case PROCESSOR_ARCHITECTURE_ALPHA64:
-                        strcat(szSKU, "Alpha 64-bit ");
+                        safe_strcat(szSKU, "Alpha 64-bit ");
                         break;
                     case PROCESSOR_ARCHITECTURE_AMD64:
-                        strcat(szSKU, "x64 ");
+                        safe_strcat(szSKU, "x64 ");
                         break;
                     // could be needed for Windows RT Boinc ?
                     case PROCESSOR_ARCHITECTURE_ARM:
-                        strcat(szSKU, "ARM ");
+                        safe_strcat(szSKU, "ARM ");
                         break;
                     case PROCESSOR_ARCHITECTURE_ARM64:
-                        strcat(szSKU, "ARM64 ");
+                        safe_strcat(szSKU, "ARM64 ");
                         break;
                     case PROCESSOR_ARCHITECTURE_UNKNOWN:
-                        strcat(szSKU, "Unknown ");
+                        safe_strcat(szSKU, "Unknown ");
                         break;
                 }
 
-                strcat(szSKU, "Edition");
+                safe_strcat(szSKU, "Edition");
 
             } else { // Test for specific product on Windows NT 4.0 SP5 and earlier
 
@@ -884,11 +884,11 @@ int get_os_information(
                 RegCloseKey( hKey );
 
                 if ( lstrcmpi( "WINNT", szProductType) == 0 ) {
-                    strcpy( szSKU, "Workstation Edition" );
+                    safe_strcpy( szSKU, "Workstation Edition" );
                 } if ( lstrcmpi( "LANMANNT", szProductType) == 0 ) {
-                    strcpy( szSKU, "Server Edition" );
+                    safe_strcpy( szSKU, "Server Edition" );
                 } if ( lstrcmpi( "SERVERNT", szProductType) == 0 ) {
-                    strcpy( szSKU, "Advanced Server Edition" );
+                    safe_strcpy( szSKU, "Advanced Server Edition" );
                 }
 
             }
@@ -905,12 +905,12 @@ int get_os_information(
                     0, KEY_QUERY_VALUE, &hKey );
 
                 if( lRet == ERROR_SUCCESS ) {
-                    strcpy( szServicePack, ", " );
-                    strcat( szServicePack, "Service Pack 6a" );
+                    safe_strcpy( szServicePack, ", " );
+                    safe_strcat( szServicePack, "Service Pack 6a" );
                 } else {// Windows NT 4.0 prior to SP6a
                     if ( strlen(osvi.szCSDVersion) > 0 ) {
-                        strcpy( szServicePack, ", " );
-                        strcat( szServicePack, osvi.szCSDVersion );
+                        safe_strcpy( szServicePack, ", " );
+                        safe_strcat( szServicePack, osvi.szCSDVersion );
                     }
                 }
 
@@ -918,8 +918,8 @@ int get_os_information(
 
             } else { // Windows NT 3.51 and earlier or Windows 2000 and later
                 if ( strlen(osvi.szCSDVersion) > 0 ) {
-                    strcpy( szServicePack, ", " );
-                    strcat( szServicePack, osvi.szCSDVersion );
+                    safe_strcpy( szServicePack, ", " );
+                    safe_strcat( szServicePack, osvi.szCSDVersion );
                 }
             }
 
@@ -930,12 +930,12 @@ int get_os_information(
 
             if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 0) {
                 if ( osvi.szCSDVersion[1] == 'C' || osvi.szCSDVersion[1] == 'B' )
-                    strcpy( szServicePack, "OSR2" );
+                    safe_strcpy( szServicePack, "OSR2" );
             }
 
             if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 10) {
                 if ( osvi.szCSDVersion[1] == 'A' )
-                    strcpy( szServicePack, "SE" );
+                    safe_strcpy( szServicePack, "SE" );
             }
 
             break;
@@ -1123,7 +1123,7 @@ bool is_avx_supported() {
 // see: http://www.intel.com/Assets/PDF/appnote/241618.pdf
 // see: http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/25481.pdf
 #define FEATURE_TEST(feature_set_supported, test, feature_name) \
-    if (feature_set_supported && test) strncat(features, feature_name, features_size - strlen(features))
+    if (feature_set_supported && test) strlcat(features, feature_name, features_size)
 
 int get_processor_features(char* vendor, char* features, int features_size) {
     unsigned int std_eax = 0, std_ebx = 0, std_ecx = 0, std_edx = 0;
@@ -1377,7 +1377,7 @@ int HOST_INFO::get_virtualbox_version() {
     DWORD dwVersion = sizeof(szVersion);
     LONG lRet;
 
-    strcpy(virtualbox_version, "");
+    safe_strcpy(virtualbox_version, "");
 
     lRet = RegOpenKeyEx( HKEY_LOCAL_MACHINE,
         "SOFTWARE\\Oracle\\VirtualBox",
@@ -1403,7 +1403,7 @@ int HOST_INFO::get_virtualbox_version() {
             }
         }
 
-        strncat(szInstallDir, "\\virtualbox.exe", sizeof(szInstallDir) - strlen(szInstallDir));
+        safe_strcat(szInstallDir, "\\virtualbox.exe");
 
         if (boinc_file_exists(szInstallDir)) {
             safe_strcpy(virtualbox_version, szVersion);
diff --git a/client/http_curl.cpp b/client/http_curl.cpp
index 78c0302..0bda30a 100644
--- a/client/http_curl.cpp
+++ b/client/http_curl.cpp
@@ -20,8 +20,9 @@
 #ifdef _WIN32
 #include "boinc_win.h"
 #ifdef _MSC_VER
-#define unlink _unlink
-#define chdir _chdir
+#define unlink   _unlink
+#define chdir    _chdir
+#define snprintf _snprintf
 #endif
 #else
 #include "config.h"
@@ -70,14 +71,15 @@ static bool got_expectation_failed = false;
 
 static void get_user_agent_string() {
     if (g_user_agent_string[0]) return;
-    sprintf(g_user_agent_string, "BOINC client (%s %d.%d.%d)",
+    snprintf(g_user_agent_string, sizeof(g_user_agent_string),
+        "BOINC client (%s %d.%d.%d)",
         gstate.get_primary_platform(),
         BOINC_MAJOR_VERSION, BOINC_MINOR_VERSION, BOINC_RELEASE
     );
     if (strlen(gstate.client_brand)) {
         char buf[256];
-        sprintf(buf, " (%s)", gstate.client_brand);
-        strcat(g_user_agent_string, buf);
+        snprintf(buf, sizeof(buf), " (%s)", gstate.client_brand);
+        safe_strcat(g_user_agent_string, buf);
     }
 }
 
@@ -234,9 +236,9 @@ void HTTP_OP::init(PROJECT* p) {
 void HTTP_OP::reset() {
     req1 = NULL;
     req1_len = 0;
-    strcpy(infile, "");
-    strcpy(outfile, "");
-    strcpy(error_msg, "");
+    safe_strcpy(infile, "");
+    safe_strcpy(outfile, "");
+    safe_strcpy(error_msg, "");
     CurlResult = CURLE_OK;
     bTempOutfile = true;
     want_download = false;
@@ -255,12 +257,12 @@ void HTTP_OP::reset() {
 
 
 HTTP_OP::HTTP_OP() {
-    strcpy(m_url, "");
-    strcpy(m_curl_ca_bundle_location, "");
-    strcpy(m_curl_user_credentials, "");
+    safe_strcpy(m_url, "");
+    safe_strcpy(m_curl_ca_bundle_location, "");
+    safe_strcpy(m_curl_user_credentials, "");
     content_length = 0;
     file_offset = 0;
-    strcpy(request_header, "");
+    safe_strcpy(request_header, "");
     http_op_state = HTTP_STATE_IDLE;
     http_op_type = HTTP_OP_NONE;
     http_op_retval = 0;
@@ -357,7 +359,9 @@ int HTTP_OP::init_post2(
         file_offset = offset;
         retval = file_size(infile, size);
         if (retval) {
-            printf("HTTP::init_post2: couldn't get file size\n");
+            if (log_flags.http_debug) {
+                msg_printf(project, MSG_INFO, "[http] HTTP::init_post2: couldn't get file size");
+            }
             return retval; // this will be 0 or ERR_NOT_FOUND
         }
         content_length = (int)size - (int)offset;
@@ -437,7 +441,7 @@ int HTTP_OP::libcurl_exec(
     } else {
         // always want an outfile for the server response, delete when op done
         bTempOutfile = true;
-        sprintf(outfile, "http_temp_%d", outfile_seqno++);
+        snprintf(outfile, sizeof(outfile), "http_temp_%d", outfile_seqno++);
     }
 
     curlEasy = curl_easy_init(); // get a curl_easy handle to use
@@ -603,7 +607,7 @@ int HTTP_OP::libcurl_exec(
     pcurlList = curl_slist_append(pcurlList, g_content_type);
 
     if (strlen(gstate.language)) {
-        sprintf(buf, "Accept-Language: %s", gstate.language);
+        snprintf(buf, sizeof(buf), "Accept-Language: %s", gstate.language);
         pcurlList = curl_slist_append(pcurlList, buf);
     }
 
@@ -611,7 +615,7 @@ int HTTP_OP::libcurl_exec(
     //
     if (!is_post && offset>0.0f) {
         file_offset = offset;
-        sprintf(buf, "Range: bytes=%.0f-", offset);
+        snprintf(buf, sizeof(buf), "Range: bytes=%.0f-", offset);
         pcurlList = curl_slist_append(pcurlList, buf);
     }
 
@@ -819,7 +823,7 @@ void HTTP_OP::setup_proxy_session(bool no_proxy) {
     // outside of this method (libcurl relies on it later when it makes
     // the proxy connection), so it has been placed as a member data for HTTP_OP
     //
-    strcpy(m_curl_user_credentials, "");
+    safe_strcpy(m_curl_user_credentials, "");
 
     if (no_proxy) {
         curl_easy_setopt(curlEasy, CURLOPT_PROXY, "");
@@ -852,7 +856,10 @@ void HTTP_OP::setup_proxy_session(bool no_proxy) {
             } else {
                 curl_easy_setopt(curlEasy, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
             }
-            sprintf(m_curl_user_credentials, "%s:%s", pi.http_user_name, pi.http_user_passwd);
+            snprintf(m_curl_user_credentials, sizeof(m_curl_user_credentials), 
+                "%s:%s",
+                pi.http_user_name, pi.http_user_passwd
+            );
             curl_easy_setopt(curlEasy, CURLOPT_PROXYUSERPWD, m_curl_user_credentials);
         }
 
@@ -868,7 +875,10 @@ void HTTP_OP::setup_proxy_session(bool no_proxy) {
         if (
             strlen(pi.socks5_user_passwd) || strlen(pi.socks5_user_name)
         ) {
-            sprintf(m_curl_user_credentials, "%s:%s", pi.socks5_user_name, pi.socks5_user_passwd);
+            snprintf(m_curl_user_credentials, sizeof(m_curl_user_credentials), 
+                "%s:%s",
+                pi.socks5_user_name, pi.socks5_user_passwd
+            );
             curl_easy_setopt(curlEasy, CURLOPT_PROXYUSERPWD, m_curl_user_credentials);
             curl_easy_setopt(curlEasy, CURLOPT_PROXYAUTH, CURLAUTH_ANY & ~CURLAUTH_NTLM);
         }
@@ -1071,7 +1081,7 @@ void HTTP_OP::handle_messages(CURLMsg *pcurlMsg) {
                 outfile
             );
         } else {
-            strcpy(req1, "");
+            strlcpy(req1, "", req1_len);
             if (dSize >= (size_t)req1_len) {
                 dSize = req1_len-1;
             }
diff --git a/client/log_flags.cpp b/client/log_flags.cpp
index fe5b1c1..7e9386d 100644
--- a/client/log_flags.cpp
+++ b/client/log_flags.cpp
@@ -20,7 +20,8 @@
 #ifdef _WIN32
 #include "boinc_win.h"
 #ifdef _MSC_VER
-#define chdir _chdir
+#define chdir    _chdir
+#define snprintf _snprintf
 #endif
 #else
 #include "config.h"
@@ -50,60 +51,60 @@ using std::string;
 LOG_FLAGS log_flags;
 CC_CONFIG cc_config;
 
-static void show_flag(char* buf, bool flag, const char* flag_name) {
+static void show_flag(char* buf, int len, bool flag, const char* flag_name) {
     if (!flag) return;
     int n = (int)strlen(buf);
     if (!n) {
-        strlcpy(buf, flag_name, 256);
+        strlcpy(buf, flag_name, len);
         return;
     }
-    strcat(buf, ", ");
-    strcat(buf, flag_name);
+    strlcat(buf, ", ", len);
+    strlcat(buf, flag_name, len);
     if (strlen(buf) > 60) {
         msg_printf(NULL, MSG_INFO, "log flags: %s", buf);
-        strcpy(buf, "");
+        strlcpy(buf, "", len);
     }
 }
 
 void LOG_FLAGS::show() {
     char buf[256];
-    strcpy(buf, "");
-    show_flag(buf, file_xfer, "file_xfer");
-    show_flag(buf, sched_ops, "sched_ops");
-    show_flag(buf, task, "task");
-
-    show_flag(buf, app_msg_receive, "app_msg_receive");
-    show_flag(buf, app_msg_send, "app_msg_send");
-    show_flag(buf, async_file_debug, "async_file_debug");
-    show_flag(buf, benchmark_debug, "benchmark_debug");
-    show_flag(buf, checkpoint_debug, "checkpoint_debug");
-    show_flag(buf, coproc_debug, "coproc_debug");
-    show_flag(buf, cpu_sched, "cpu_sched");
-    show_flag(buf, cpu_sched_debug, "cpu_sched_debug");
-    show_flag(buf, cpu_sched_status, "cpu_sched_status");
-    show_flag(buf, dcf_debug, "dcf_debug");
-    show_flag(buf, file_xfer_debug, "file_xfer_debug");
-    show_flag(buf, gui_rpc_debug, "gui_rpc_debug");
-    show_flag(buf, heartbeat_debug, "heartbeat_debug");
-    show_flag(buf, http_debug, "http_debug");
-    show_flag(buf, http_xfer_debug, "http_xfer_debug");
-    show_flag(buf, idle_detection_debug, "idle_detection_debug");
-    show_flag(buf, mem_usage_debug, "mem_usage_debug");
-    show_flag(buf, network_status_debug, "network_status_debug");
-    show_flag(buf, notice_debug, "notice_debug");
-    show_flag(buf, poll_debug, "poll_debug");
-    show_flag(buf, priority_debug, "priority_debug");
-    show_flag(buf, proxy_debug, "proxy_debug");
-    show_flag(buf, rr_simulation, "rr_simulation");
-    show_flag(buf, sched_op_debug, "sched_op_debug");
-    show_flag(buf, scrsave_debug, "scrsave_debug");
-    show_flag(buf, slot_debug, "slot_debug");
-    show_flag(buf, state_debug, "state_debug");
-    show_flag(buf, statefile_debug, "statefile_debug");
-    show_flag(buf, task_debug, "task_debug");
-    show_flag(buf, time_debug, "time_debug");
-    show_flag(buf, unparsed_xml, "unparsed_xml");
-    show_flag(buf, work_fetch_debug, "work_fetch_debug");
+    safe_strcpy(buf, "");
+    show_flag(buf, sizeof(buf), file_xfer, "file_xfer");
+    show_flag(buf, sizeof(buf), sched_ops, "sched_ops");
+    show_flag(buf, sizeof(buf), task, "task");
+
+    show_flag(buf, sizeof(buf), app_msg_receive, "app_msg_receive");
+    show_flag(buf, sizeof(buf), app_msg_send, "app_msg_send");
+    show_flag(buf, sizeof(buf), async_file_debug, "async_file_debug");
+    show_flag(buf, sizeof(buf), benchmark_debug, "benchmark_debug");
+    show_flag(buf, sizeof(buf), checkpoint_debug, "checkpoint_debug");
+    show_flag(buf, sizeof(buf), coproc_debug, "coproc_debug");
+    show_flag(buf, sizeof(buf), cpu_sched, "cpu_sched");
+    show_flag(buf, sizeof(buf), cpu_sched_debug, "cpu_sched_debug");
+    show_flag(buf, sizeof(buf), cpu_sched_status, "cpu_sched_status");
+    show_flag(buf, sizeof(buf), dcf_debug, "dcf_debug");
+    show_flag(buf, sizeof(buf), file_xfer_debug, "file_xfer_debug");
+    show_flag(buf, sizeof(buf), gui_rpc_debug, "gui_rpc_debug");
+    show_flag(buf, sizeof(buf), heartbeat_debug, "heartbeat_debug");
+    show_flag(buf, sizeof(buf), http_debug, "http_debug");
+    show_flag(buf, sizeof(buf), http_xfer_debug, "http_xfer_debug");
+    show_flag(buf, sizeof(buf), idle_detection_debug, "idle_detection_debug");
+    show_flag(buf, sizeof(buf), mem_usage_debug, "mem_usage_debug");
+    show_flag(buf, sizeof(buf), network_status_debug, "network_status_debug");
+    show_flag(buf, sizeof(buf), notice_debug, "notice_debug");
+    show_flag(buf, sizeof(buf), poll_debug, "poll_debug");
+    show_flag(buf, sizeof(buf), priority_debug, "priority_debug");
+    show_flag(buf, sizeof(buf), proxy_debug, "proxy_debug");
+    show_flag(buf, sizeof(buf), rr_simulation, "rr_simulation");
+    show_flag(buf, sizeof(buf), sched_op_debug, "sched_op_debug");
+    show_flag(buf, sizeof(buf), scrsave_debug, "scrsave_debug");
+    show_flag(buf, sizeof(buf), slot_debug, "slot_debug");
+    show_flag(buf, sizeof(buf), state_debug, "state_debug");
+    show_flag(buf, sizeof(buf), statefile_debug, "statefile_debug");
+    show_flag(buf, sizeof(buf), task_debug, "task_debug");
+    show_flag(buf, sizeof(buf), time_debug, "time_debug");
+    show_flag(buf, sizeof(buf), unparsed_xml, "unparsed_xml");
+    show_flag(buf, sizeof(buf), work_fetch_debug, "work_fetch_debug");
 
     if (strlen(buf)) {
         msg_printf(NULL, MSG_INFO, "log flags: %s", buf);
@@ -138,7 +139,7 @@ static void show_exclude_gpu(EXCLUDE_GPU& e) {
     if (e.device_num < 0) {
         safe_strcpy(dev, "all");
     } else {
-        sprintf(dev, "%d", e.device_num);
+        snprintf(dev, sizeof(dev), "%d", e.device_num);
     }
     msg_printf(p, MSG_INFO,
         "Config: excluded GPU.  Type: %s.  App: %s.  Device: %s",
@@ -734,7 +735,7 @@ void process_gpu_exclusions() {
         }
         if (found) continue;
         avp->missing_coproc = true;
-        strcpy(avp->missing_coproc_name, "");
+        safe_strcpy(avp->missing_coproc_name, "");
         for (j=0; j<gstate.results.size(); j++) {
             RESULT* rp = gstate.results[j];
             if (rp->avp != avp) continue;
diff --git a/client/main.cpp b/client/main.cpp
index db5592e..155760c 100644
--- a/client/main.cpp
+++ b/client/main.cpp
@@ -473,11 +473,11 @@ int main(int argc, char** argv) {
             }
             commandLine[0] = '"';
             // OK, we can safely use strcpy and strcat, since we know that we allocated enough
-            strcpy(&commandLine[1], argv[0]);
-            strcat(commandLine, "\"");
+            strlcpy(&commandLine[1], argv[0], len);
+            strlcat(commandLine, "\"", len);
             for (i = 1; i < argc; i++) {
-                strcat(commandLine, " ");
-                strcat(commandLine, argv[i]);
+                strlcat(commandLine, " ", len);
+                strlcat(commandLine, argv[i], len);
             }
 
             memset(&si, 0, sizeof(si));
diff --git a/client/project.cpp b/client/project.cpp
index 541261b..495972e 100644
--- a/client/project.cpp
+++ b/client/project.cpp
@@ -18,6 +18,10 @@
 #include <boinc_win.h>
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #include <string.h>
 
 #include "str_replace.h"
@@ -36,10 +40,10 @@ PROJECT::PROJECT() {
 }
 
 void PROJECT::init() {
-    strcpy(master_url, "");
-    strcpy(authenticator, "");
-    strcpy(_project_dir, "");
-    strcpy(_project_dir_absolute, "");
+    safe_strcpy(master_url, "");
+    safe_strcpy(authenticator, "");
+    safe_strcpy(_project_dir, "");
+    safe_strcpy(_project_dir_absolute, "");
     project_specific_prefs = "";
     gui_urls = "";
     resource_share = 100;
@@ -50,16 +54,16 @@ void PROJECT::init() {
         no_rsc_apps[i] = false;
         no_rsc_ams[i] = false;
     }
-    strcpy(host_venue, "");
+    safe_strcpy(host_venue, "");
     using_venue_specific_prefs = false;
     scheduler_urls.clear();
-    strcpy(project_name, "");
-    strcpy(symstore, "");
-    strcpy(user_name, "");
-    strcpy(team_name, "");
-    strcpy(email_hash, "");
-    strcpy(cross_project_id, "");
-    strcpy(external_cpid, "");
+    safe_strcpy(project_name, "");
+    safe_strcpy(symstore, "");
+    safe_strcpy(user_name, "");
+    safe_strcpy(team_name, "");
+    safe_strcpy(email_hash, "");
+    safe_strcpy(cross_project_id, "");
+    safe_strcpy(external_cpid, "");
     cpid_time = 0;
     user_total_credit = 0;
     user_expavg_credit = 0;
@@ -94,7 +98,7 @@ void PROJECT::init() {
     detach_when_done = false;
     attached_via_acct_mgr = false;
     ended = false;
-    strcpy(code_sign_key, "");
+    safe_strcpy(code_sign_key, "");
     user_files.clear();
     project_files.clear();
     next_runnable_result = NULL;
@@ -670,7 +674,7 @@ void PROJECT::delete_project_file_symlinks() {
 
     for (i=0; i<project_files.size(); i++) {
         FILE_REF& fref = project_files[i];
-        sprintf(path, "%s/%s", project_dir(), fref.open_name);
+        snprintf(path, sizeof(path), "%s/%s", project_dir(), fref.open_name);
         delete_project_owned_file(path, false);
     }
 }
@@ -730,8 +734,8 @@ int PROJECT::write_symlink_for_project_file(FILE_INFO* fip) {
     for (i=0; i<project_files.size(); i++) {
         FILE_REF& fref = project_files[i];
         if (fref.file_info != fip) continue;
-        sprintf(link_path, "%s/%s", project_dir(), fref.open_name);
-        sprintf(file_path, "%s/%s", project_dir(), fip->name);
+        snprintf(link_path, sizeof(link_path), "%s/%s", project_dir(), fref.open_name);
+        snprintf(file_path, sizeof(file_path), "%s/%s", project_dir(), fip->name);
         make_soft_link(this, link_path, file_path);
     }
     return 0;
@@ -888,7 +892,7 @@ const char* PROJECT::project_dir() {
     if (_project_dir[0] == 0) {
         char buf[1024];
         escape_project_url(master_url, buf);
-        sprintf(_project_dir, "%s/%s", PROJECTS_DIR, buf);
+        snprintf(_project_dir, sizeof(_project_dir), "%s/%s", PROJECTS_DIR, buf);
     }
     return _project_dir;
 }
diff --git a/client/result.cpp b/client/result.cpp
index 2e087d5..59690f1 100644
--- a/client/result.cpp
+++ b/client/result.cpp
@@ -15,8 +15,18 @@
 // You should have received a copy of the GNU Lesser General Public License
 // along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
 
+#ifdef _WIN32
+#include "boinc_win.h"
+#else
+#include "config.h"
 #include <math.h>
+#endif
+
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
 
+#include "str_replace.h"
 #include "parse.h"
 
 #include "client_msgs.h"
@@ -26,7 +36,7 @@
 #include "result.h"
 
 int RESULT::parse_name(XML_PARSER& xp, const char* end_tag) {
-    strcpy(name, "");
+    safe_strcpy(name, "");
     while (!xp.get_tag()) {
         if (xp.match_tag(end_tag)) return 0;
         if (xp.parse_str("name", name, sizeof(name))) continue;
@@ -42,13 +52,13 @@ int RESULT::parse_name(XML_PARSER& xp, const char* end_tag) {
 }
 
 void RESULT::clear() {
-    strcpy(name, "");
-    strcpy(wu_name, "");
+    safe_strcpy(name, "");
+    safe_strcpy(wu_name, "");
     received_time = 0;
     report_deadline = 0;
     version_num = 0;
-    strcpy(plan_class, "");
-    strcpy(platform, "");
+    safe_strcpy(plan_class, "");
+    safe_strcpy(platform, "");
     avp = NULL;
     output_files.clear();
     ready_to_report = false;
@@ -89,9 +99,9 @@ void RESULT::clear() {
     unfinished_time_slice = false;
     seqno = 0;
     edf_scheduled = false;
-    strcpy(resources, "");
+    safe_strcpy(resources, "");
     schedule_backoff = 0;
-    strcpy(schedule_backoff_reason, "");
+    safe_strcpy(schedule_backoff_reason, "");
 }
 
 // parse a <result> element from scheduling server.
@@ -387,14 +397,14 @@ int RESULT::write_gui(MIOFILE& out) {
         //
         if (avp->gpu_usage.rsc_type) {
             if (avp->gpu_usage.usage == 1) {
-                sprintf(resources,
+                snprintf(resources, sizeof(resources),
                     "%.3g %s + 1 %s",
                     avp->avg_ncpus,
                     cpu_string(avp->avg_ncpus),
                     rsc_name_long(avp->gpu_usage.rsc_type)
                 );
             } else {
-                sprintf(resources,
+                snprintf(resources, sizeof(resources),
                     "%.3g %s + %.3g %ss",
                     avp->avg_ncpus,
                     cpu_string(avp->avg_ncpus),
@@ -403,23 +413,25 @@ int RESULT::write_gui(MIOFILE& out) {
                 );
             }
         } else if (avp->missing_coproc) {
-            sprintf(resources, "%.3g %s + %s GPU (missing)",
+            snprintf(resources, sizeof(resources),
+                "%.3g %s + %s GPU (missing)",
                 avp->avg_ncpus,
                 cpu_string(avp->avg_ncpus),
                 avp->missing_coproc_name
             );
         } else if (!project->non_cpu_intensive && (avp->avg_ncpus != 1)) {
-            sprintf(resources, "%.3g %s",
+            snprintf(resources, sizeof(resources),
+                "%.3g %s",
                 avp->avg_ncpus,
                 cpu_string(avp->avg_ncpus)
             );
         } else {
-            strcpy(resources, " ");
+            safe_strcpy(resources, " ");
         }
     }
     if (strlen(resources)>1) {
         char buf[256];
-        strcpy(buf, "");
+        safe_strcpy(buf, "");
         if (atp && atp->scheduler_state == CPU_SCHED_SCHEDULED) {
             if (avp->gpu_usage.rsc_type) {
                 COPROC& cp = coprocs.coprocs[avp->gpu_usage.rsc_type];
@@ -428,16 +440,16 @@ int RESULT::write_gui(MIOFILE& out) {
                     // show the user which one(s) are being used
                     //
                     int n = (int)ceil(avp->gpu_usage.usage);
-                    strcpy(buf, n>1?" (devices ":" (device ");
+                    safe_strcpy(buf, n>1?" (devices ":" (device ");
                     for (int i=0; i<n; i++) {
                         char buf2[256];
                         sprintf(buf2, "%d", cp.device_nums[coproc_indices[i]]);
                         if (i > 0) {
-                            strcat(buf, ", ");
+                            safe_strcat(buf, ", ");
                         }
-                        strcat(buf, buf2);
+                        safe_strcat(buf, buf2);
                     }
-                    strcat(buf, ")");
+                    safe_strcat(buf, ")");
                 }
             }
         }
@@ -692,9 +704,9 @@ void add_old_result(RESULT& r) {
         }
     }
     OLD_RESULT ores;
-    strcpy(ores.project_url, r.project->master_url);
-    strcpy(ores.result_name, r.name);
-    strcpy(ores.app_name, r.app->name);
+    safe_strcpy(ores.project_url, r.project->master_url);
+    safe_strcpy(ores.result_name, r.name);
+    safe_strcpy(ores.app_name, r.app->name);
     ores.elapsed_time = r.final_elapsed_time;
     ores.cpu_time = r.final_cpu_time;
     ores.completed_time = r.completed_time;
diff --git a/client/rr_sim.cpp b/client/rr_sim.cpp
index e62861a..71242fe 100644
--- a/client/rr_sim.cpp
+++ b/client/rr_sim.cpp
@@ -42,6 +42,10 @@
 #include "config.h"
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #include "client_msgs.h"
 #include "client_state.h"
 #include "coproc.h"
@@ -50,15 +54,16 @@
 
 using std::vector;
 
-inline void rsc_string(RESULT* rp, char* buf) {
+inline void rsc_string(RESULT* rp, char* buf, int len) {
     APP_VERSION* avp = rp->avp;
     if (avp->gpu_usage.rsc_type) {
-        sprintf(buf, "%.2f CPU + %.2f %s",
+        snprintf(buf, len,
+            "%.2f CPU + %.2f %s",
             avp->avg_ncpus, avp->gpu_usage.usage,
             rsc_name_long(avp->gpu_usage.rsc_type)
         );
     } else {
-        sprintf(buf, "%.2f CPU", avp->avg_ncpus);
+        snprintf(buf, len, "%.2f CPU", avp->avg_ncpus);
     }
 }
 
@@ -273,7 +278,7 @@ void RR_SIM::pick_jobs_to_run(double reltime) {
                 adjust_rec_sched(rp);
                 if (log_flags.rrsim_detail && !rp->already_selected) {
                     char buf[256];
-                    rsc_string(rp, buf);
+                    rsc_string(rp, buf, sizeof(buf));
                     msg_printf(rp->project, MSG_INFO,
                         "[rr_sim_detail] %.2f: starting %s (%s) (%.2fG/%.2fG)",
                         reltime, rp->name, buf, rp->rrsim_flops_left/1e9, rp->rrsim_flops/1e9
@@ -443,7 +448,7 @@ void RR_SIM::simulate() {
             pbest = rpbest->project;
             if (log_flags.rr_simulation) {
                 char buf[256];
-                rsc_string(rpbest, buf);
+                rsc_string(rpbest, buf, sizeof(buf));
                 msg_printf(pbest, MSG_INFO,
                     "[rr_sim] %.2f: %s finishes (%s) (%.2fG/%.2fG)",
                     sim_now + delta_t - gstate.now,
diff --git a/client/sandbox.cpp b/client/sandbox.cpp
index bde534b..33bc0df 100644
--- a/client/sandbox.cpp
+++ b/client/sandbox.cpp
@@ -29,6 +29,10 @@
 #include <grp.h>
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #include "error_numbers.h"
 #include "file_names.h"
 #include "util.h"
@@ -61,7 +65,7 @@ int switcher_exec(const char *util_filename, const char* cmdline) {
     int retval;
     std::string output_out, output_err;
 
-    sprintf(util_path, "%s/%s", SWITCHER_DIR, util_filename);
+    snprintf(util_path, sizeof(util_path), "%s/%s", SWITCHER_DIR, util_filename);
     argv[0] = const_cast<char*>(util_filename);
     // Make a copy of cmdline because parse_command_line modifies it
     safe_strcpy(command, cmdline);
@@ -171,7 +175,7 @@ int kill_via_switcher(int pid) {
     // client is running as user boinc_master,
     // we cannot send a signal directly, so use switcher.
     //
-    sprintf(cmd, "/bin/kill kill -s KILL %d", pid);
+    snprintf(cmd, sizeof(cmd), "/bin/kill kill -s KILL %d", pid);
     return switcher_exec(SWITCHER_FILE_NAME, cmd);
 }
 
@@ -188,7 +192,7 @@ int remove_project_owned_file_or_dir(const char* path) {
     char cmd[1024];
 
     if (g_use_sandbox) {
-        sprintf(cmd, "/bin/rm rm -fR \"%s\"", path);
+        snprintf(cmd, sizeof(cmd), "/bin/rm rm -fR \"%s\"", path);
         if (switcher_exec(SWITCHER_FILE_NAME, cmd)) {
             return ERR_UNLINK;
         } else {
@@ -325,7 +329,7 @@ int client_clean_out_dir(
     }
 
     while (1) {
-        strcpy(filename, "");
+        safe_strcpy(filename, "");
         retval = dir_scan(filename, dirp, sizeof(filename));
         if (retval) {
             if (retval != ERR_NOT_FOUND) {
@@ -342,7 +346,7 @@ int client_clean_out_dir(
         if (except && !strcmp(except, filename)) {
             continue;
         }
-        sprintf(path, "%s/%s", dirpath,  filename);
+        snprintf(path, sizeof(path), "%s/%s", dirpath,  filename);
         if (is_dir(path)) {
             retval = client_clean_out_dir(path, NULL);
             if (retval) final_retval = retval;
diff --git a/client/scheduler_op.cpp b/client/scheduler_op.cpp
index 17ab318..22d6882 100644
--- a/client/scheduler_op.cpp
+++ b/client/scheduler_op.cpp
@@ -27,6 +27,10 @@
 #include <ctime>
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #include "error_numbers.h"
 #include "filesys.h"
 #include "parse.h"
@@ -50,7 +54,7 @@ SCHEDULER_OP::SCHEDULER_OP(HTTP_OP_SET* h) {
     scheduler_op_retval = 0;
     http_op.http_op_state = HTTP_STATE_IDLE;
     http_ops = h;
-    strcpy(scheduler_url,"");
+    safe_strcpy(scheduler_url,"");
     url_index = 0;
     cur_proj = NULL;
     state = SCHEDULER_OP_STATE_IDLE;
@@ -102,7 +106,7 @@ int SCHEDULER_OP::init_op_project(PROJECT* p, int r) {
     if (p->scheduler_urls.size() == 0) {
         retval = init_master_fetch(p);
         if (retval) {
-            sprintf(err_msg,
+            snprintf(err_msg, sizeof(err_msg),
                 "Scheduler list fetch initialization failed: %d\n", retval
             );
             project_rpc_backoff(p, err_msg);
@@ -123,7 +127,7 @@ int SCHEDULER_OP::init_op_project(PROJECT* p, int r) {
         retval = start_rpc(p);
     }
     if (retval) {
-        sprintf(err_msg,
+        snprintf(err_msg, sizeof(err_msg),
             "scheduler request to %s failed: %s\n",
             p->get_scheduler_url(url_index, url_random), boincerror(retval)
         );
@@ -161,7 +165,7 @@ void SCHEDULER_OP::project_rpc_backoff(PROJECT* p, const char *reason_msg) {
     }
 
     if (p->master_fetch_failures >= gstate.master_fetch_retry_cap) {
-        sprintf(buf,
+        snprintf(buf, sizeof(buf),
             "%d consecutive failures fetching scheduler list",
             p->master_fetch_failures
         );
@@ -215,13 +219,13 @@ void SCHEDULER_OP::rpc_failed(const char* msg) {
     cur_proj = 0;
 }
 
-static void request_string(char* buf) {
+static void request_string(char* buf, int len) {
     bool first = true;
-    strcpy(buf, "");
+    strlcpy(buf, "", len);
     for (int i=0; i<coprocs.n_rsc; i++) {
         if (rsc_work_fetch[i].req_secs) {
-            if (!first) strcat(buf, " and ");
-            strcat(buf, rsc_name_long(i));
+            if (!first) strlcat(buf, " and ", len);
+            strlcat(buf, rsc_name_long(i), len);
             first = false;
         }
     }
@@ -248,13 +252,13 @@ int SCHEDULER_OP::start_rpc(PROJECT* p) {
                 "Reporting %d completed tasks", p->nresults_returned
             );
         }
-        request_string(buf);
+        request_string(buf, sizeof(buf));
         if (strlen(buf)) {
             msg_printf(p, MSG_INFO, "Requesting new tasks for %s", buf);
         } else {
             if (p->pwf.project_reason) {
                 msg_printf(p, MSG_INFO,
-                    "Not requesting tasks: %s", project_reason_string(p, buf)
+                    "Not requesting tasks: %s", project_reason_string(p, buf, sizeof(buf))
                 );
             } else {
                 msg_printf(p, MSG_INFO, "Not requesting tasks");
@@ -459,7 +463,7 @@ bool SCHEDULER_OP::poll() {
                 // master file fetch failed.
                 //
                 char buf[256];
-                sprintf(buf, "Scheduler list fetch failed: %s",
+                snprintf(buf, sizeof(buf), "Scheduler list fetch failed: %s",
                     boincerror(http_op.http_op_retval)
                 );
                 cur_proj->master_fetch_failures++;
@@ -539,8 +543,8 @@ void SCHEDULER_REPLY::clear() {
     messages.clear();
     global_prefs_xml = 0;
     project_prefs_xml = 0;
-    strcpy(master_url, "");
-    strcpy(host_venue, "");
+    safe_strcpy(master_url, "");
+    safe_strcpy(host_venue, "");
     user_create_time = 0;
     code_sign_key = 0;
     code_sign_key_signature = 0;
diff --git a/client/sim.cpp b/client/sim.cpp
index 33c5c48..096756d 100644
--- a/client/sim.cpp
+++ b/client/sim.cpp
@@ -58,6 +58,7 @@
 #include <cmath>
 
 #include "error_numbers.h"
+#include "str_replace.h"
 #include "str_util.h"
 #include "util.h"
 #include "log_flags.h"
@@ -861,7 +862,7 @@ void show_resource(int rsc_type) {
         if (rsc_type) {
             sprintf(buf, "<td>%d</td>", rp->coproc_indices[0]);
         } else {
-            strcpy(buf, "");
+            safe_strcpy(buf, "");
         }
         fprintf(html_out, "<tr><td>%.2f</td><td bgcolor=%s><font color=#ffffff>%s%s</font></td><td>%.0f</td>%s</tr>\n",
             ninst,
diff --git a/client/sim_util.cpp b/client/sim_util.cpp
index bd8c323..6091b87 100644
--- a/client/sim_util.cpp
+++ b/client/sim_util.cpp
@@ -67,7 +67,7 @@ char* sim_time_string(int t) {
             sprintf(buf2, "%d days ", n);
         }
     } else {
-        strcpy(buf2, "");
+        safe_strcpy(buf2, "");
     }
     int hours = t / 3600;
     t %= 3600;
@@ -82,7 +82,7 @@ void show_message(PROJ_AM *p, char* msg, int priority, bool, const char*) {
     char message[1024];
 
     if (priority == MSG_INTERNAL_ERROR) {
-        strcpy(message, "[error] ");
+        strlcpy(message, "[error] ", sizeof(message));
         strlcpy(message+8, msg, sizeof(message)-8);
     } else {
         strlcpy(message, msg, sizeof(message));
diff --git a/client/sysmon_win.cpp b/client/sysmon_win.cpp
index 77b87fd..cec8e69 100644
--- a/client/sysmon_win.cpp
+++ b/client/sysmon_win.cpp
@@ -17,6 +17,10 @@
 
 #include "boinc_win.h"
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #include "diagnostics.h"
 #include "error_numbers.h"
 #include "filesys.h"
@@ -306,7 +310,7 @@ static void windows_detect_autoproxy_settings() {
     );
 
     char msg[1024], buf[1024];
-    strcpy(msg, "[proxy] ");
+    safe_strcpy(msg, "[proxy] ");
 
     if (WinHttpGetProxyForUrl(hWinHttp, network_test_url.c_str(), &autoproxy_options, &proxy_info)) {
 
@@ -320,8 +324,8 @@ static void windows_detect_autoproxy_settings() {
             std::string new_proxy;
 
             if (log_flags.proxy_debug) {
-                strcat(msg, "proxy list: ");
-                strcat(msg, proxy.c_str());
+                safe_strcat(msg, "proxy list: ");
+                safe_strcat(msg, proxy.c_str());
             }
 
             if (!proxy.empty()) {
@@ -357,8 +361,8 @@ static void windows_detect_autoproxy_settings() {
                 }
 
                 if (log_flags.proxy_debug) {
-                    sprintf(buf, "proxy detected %s:%d", purl.host, purl.port);
-                    strcat(msg, buf);
+                    snprintf(buf, sizeof(buf), "proxy detected %s:%d", purl.host, purl.port);
+                    safe_strcat(msg, buf);
                 }
             }
         }
@@ -370,10 +374,10 @@ static void windows_detect_autoproxy_settings() {
         // We can get here if the user is switching from a network that
         // requires a proxy to one that does not require a proxy.
         working_proxy_info.autodetect_protocol = 0;
-        strcpy(working_proxy_info.autodetect_server_name, "");
+        safe_strcpy(working_proxy_info.autodetect_server_name, "");
         working_proxy_info.autodetect_port = 0;
         if (log_flags.proxy_debug) {
-            strcat(msg, "no automatic proxy detected");
+            safe_strcat(msg, "no automatic proxy detected");
         }
     }
     if (hWinHttp) WinHttpCloseHandle(hWinHttp);
@@ -687,7 +691,7 @@ VOID LogEventErrorMessage(LPTSTR lpszMsg) {
     //
     hEventSource = RegisterEventSource(NULL, TEXT(SZSERVICENAME));
 
-    _stprintf(szMsg, TEXT("%s error: %d"), TEXT(SZSERVICENAME), dwErr);
+    _stprintf_s(szMsg, TEXT("%s error: %d"), TEXT(SZSERVICENAME), dwErr);
     lpszStrings[0] = szMsg;
     lpszStrings[1] = lpszMsg;
 
diff --git a/client/time_stats.cpp b/client/time_stats.cpp
index 6e0c31b..738eda5 100644
--- a/client/time_stats.cpp
+++ b/client/time_stats.cpp
@@ -30,6 +30,10 @@
 #endif
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #include "error_numbers.h"
 #include "filesys.h"
 #include "parse.h"
@@ -221,10 +225,14 @@ void CLIENT_TIME_STATS::update(int suspend_reason, int _gpu_suspend_reason) {
             log_append("power_off", last_update);
             char buf[256];
 #ifndef SIM
-            sprintf(buf, "platform %s", gstate.get_primary_platform());
+            snprintf(buf, sizeof(buf),
+                "platform %s",
+                gstate.get_primary_platform()
+            );
             log_append(buf, gstate.now);
 #endif
-            sprintf(buf, "version %d.%d.%d",
+            snprintf(buf, sizeof(buf),
+                "version %d.%d.%d",
                 BOINC_MAJOR_VERSION, BOINC_MINOR_VERSION, BOINC_RELEASE
             );
             log_append(buf, gstate.now);
diff --git a/client/work_fetch.cpp b/client/work_fetch.cpp
index 973df36..53982ae 100644
--- a/client/work_fetch.cpp
+++ b/client/work_fetch.cpp
@@ -15,17 +15,21 @@
 // You should have received a copy of the GNU Lesser General Public License
 // along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
 
-#include <cmath>
-
 #include "cpp.h"
 
 #ifdef _WIN32
 #include "boinc_win.h"
 #else
 #include "config.h"
+#include <cmath>
+#endif
+
+#ifdef _MSC_VER
+#define snprintf _snprintf
 #endif
 
 #include "util.h"
+#include "str_replace.h"
 
 #include "client_msgs.h"
 #include "client_state.h"
@@ -298,11 +302,12 @@ void RSC_WORK_FETCH::print_state(const char* name) {
         RSC_PROJECT_WORK_FETCH& rpwf = project_state(p);
         double bt = rpwf.backoff_time>gstate.now?rpwf.backoff_time-gstate.now:0;
         if (bt) {
-            sprintf(buf, " (resource backoff: %.2f, inc %.2f)",
+            snprintf(buf, sizeof(buf),
+                " (resource backoff: %.2f, inc %.2f)",
                 bt, rpwf.backoff_interval
             );
         } else {
-            strcpy(buf, "");
+            safe_strcpy(buf, "");
         }
         msg_printf(p, MSG_INFO,
             "[work_fetch] share %.3f %s %s",
@@ -350,15 +355,22 @@ void PROJECT_WORK_FETCH::rr_init(PROJECT* p) {
 void PROJECT_WORK_FETCH::print_state(PROJECT* p) {
     char buf[1024], buf2[1024];
     if (project_reason) {
-        sprintf(buf, "can't request work: %s", project_reason_string(p, buf2));
+        snprintf(buf, sizeof(buf),
+            "can't request work: %s",
+            project_reason_string(p, buf2, sizeof(buf2))
+        );
     } else {
-        strcpy(buf, "can request work");
+        safe_strcpy(buf, "can request work");
     }
     if (p->min_rpc_time > gstate.now) {
-        sprintf(buf2, " (%.2f sec)", p->min_rpc_time - gstate.now);
-        strcat(buf, buf2);
+        snprintf(buf2, sizeof(buf2),
+            " (%.2f sec)",
+            p->min_rpc_time - gstate.now
+        );
+        safe_strcat(buf, buf2);
     }
-    msg_printf(p, MSG_INFO, "[work_fetch] REC %.3f prio %.3f %s",
+    msg_printf(p, MSG_INFO,
+        "[work_fetch] REC %.3f prio %.3f %s",
         rec,
         p->sched_priority,
         buf
@@ -813,17 +825,18 @@ void WORK_FETCH::compute_shares() {
     }
 }
 
-void WORK_FETCH::request_string(char* buf) {
+void WORK_FETCH::request_string(char* buf, int len) {
     char buf2[256];
-    sprintf(buf,
+    snprintf(buf, len,
         "[work_fetch] request: CPU (%.2f sec, %.2f inst)",
         rsc_work_fetch[0].req_secs, rsc_work_fetch[0].req_instances
     );
     for (int i=1; i<coprocs.n_rsc; i++) {
-        sprintf(buf2, " %s (%.2f sec, %.2f inst)",
+        snprintf(buf2, sizeof(buf2),
+            " %s (%.2f sec, %.2f inst)",
             rsc_name_long(i), rsc_work_fetch[i].req_secs, rsc_work_fetch[i].req_instances
         );
-        strcat(buf, buf2);
+        strlcat(buf, buf2, len);
     }
 }
 
@@ -856,7 +869,7 @@ void WORK_FETCH::write_request(FILE* f, PROJECT* p) {
     );
     if (log_flags.work_fetch_debug) {
         char buf[256];
-        request_string(buf);
+        request_string(buf, sizeof(buf));
         msg_printf(p, MSG_INFO, "%s", buf);
     }
 }
@@ -1110,7 +1123,7 @@ const char* rsc_project_reason_string(int reason) {
     return "unknown project reason";
 }
 
-const char* project_reason_string(PROJECT* p, char* buf) {
+const char* project_reason_string(PROJECT* p, char* buf, int len) {
     switch (p->pwf.project_reason) {
     case 0: return "";
     case CANT_FETCH_WORK_NON_CPU_INTENSIVE:
@@ -1135,7 +1148,8 @@ const char* project_reason_string(PROJECT* p, char* buf) {
         return "too many runnable tasks";
     case CANT_FETCH_WORK_DONT_NEED:
         if (coprocs.n_rsc == 1) {
-            sprintf(buf, "don't need (%s)",
+            snprintf(buf, len,
+                "don't need (%s)",
                 rsc_project_reason_string(rsc_work_fetch[0].dont_fetch_reason)
             );
         } else {
@@ -1143,7 +1157,8 @@ const char* project_reason_string(PROJECT* p, char* buf) {
             x = "don't need (";
             for (int i=0; i<coprocs.n_rsc; i++) {
                 char buf2[256];
-                sprintf(buf2, "%s: %s",
+                snprintf(buf2, sizeof(buf2),
+                    "%s: %s",
                     rsc_name_long(i),
                     rsc_project_reason_string(rsc_work_fetch[i].dont_fetch_reason)
                 );
@@ -1153,7 +1168,7 @@ const char* project_reason_string(PROJECT* p, char* buf) {
                 }
             }
             x += ")";
-            strcpy(buf, x.c_str());
+            strlcpy(buf, x.c_str(), len);
         }
         return buf;
     }
diff --git a/client/work_fetch.h b/client/work_fetch.h
index 58c2d3f..139e0de 100644
--- a/client/work_fetch.h
+++ b/client/work_fetch.h
@@ -335,7 +335,7 @@ struct WORK_FETCH {
     void clear_request();
     void compute_shares();
     void clear_backoffs(APP_VERSION&);
-    void request_string(char*);
+    void request_string(char*, int);
     bool requested_work();
     void copy_requests();
 };
@@ -349,7 +349,7 @@ extern void adjust_rec_sched(RESULT*);
 extern void adjust_rec_work_fetch(RESULT*);
 
 extern double total_peak_flops();
-extern const char* project_reason_string(PROJECT* p, char* buf);
+extern const char* project_reason_string(PROJECT* p, char* buf, int len);
 extern const char* rsc_project_reason_string(int);
 
 #endif
diff --git a/clientgui/AccountInfoPage.cpp b/clientgui/AccountInfoPage.cpp
index 082b4f4..eaf6594 100644
--- a/clientgui/AccountInfoPage.cpp
+++ b/clientgui/AccountInfoPage.cpp
@@ -286,9 +286,7 @@ wxIcon CAccountInfoPage::GetIconResource( const wxString& WXUNUSED(name) )
  * wxEVT_WIZARD_PAGE_CHANGED event handler for ID_ACCOUNTINFOPAGE
  */
  
-void CAccountInfoPage::OnPageChanged( wxWizardExEvent& event ) {
-    if (event.GetDirection() == false) return;
-
+void CAccountInfoPage::OnPageChanged( wxWizardExEvent& /* event */ ) {
     CWizardAttach*   pWA = ((CWizardAttach*)GetParent());
     CSkinAdvanced*   pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced();
     CSkinWizardATAM* pSkinWizardATAM = wxGetApp().GetSkinManager()->GetWizards()->GetWizardATAM();
diff --git a/clientgui/AdvancedFrame.cpp b/clientgui/AdvancedFrame.cpp
index 4ed39d1..a4c965d 100644
--- a/clientgui/AdvancedFrame.cpp
+++ b/clientgui/AdvancedFrame.cpp
@@ -1616,7 +1616,7 @@ void CAdvancedFrame::OnLaunchNewInstance(wxCommandEvent& WXUNUSED(event)) {
     err = GetProcessInformation(&myPSN, &pInfo);
     if (!err) {
         procName[procName[0]+1] = '\0'; // Convert pascal string to C string
-        sprintf(s, "open -n \"/Applications/%s.app\" --args --multiple", procName+1);
+        snprintf(s, sizeof(s), "open -n \"/Applications/%s.app\" --args --multiple", procName+1);
         system(s);
     }
 #endif
diff --git a/clientgui/BOINCBaseWizard.cpp b/clientgui/BOINCBaseWizard.cpp
index a537a0d..3532aeb 100644
--- a/clientgui/BOINCBaseWizard.cpp
+++ b/clientgui/BOINCBaseWizard.cpp
@@ -55,32 +55,6 @@ CBOINCBaseWizard::CBOINCBaseWizard(wxWindow *parent, int id, const wxString& tit
 }
 
 /*!
- * Determine if the wizard page has a previous page
- */
-wxWizardPageEx* CBOINCBaseWizard::PopPageTransition()
-{
-    return _PopPageTransition();
-}
-
-wxWizardPageEx* CBOINCBaseWizard::_PopPageTransition()
-{
-    return NULL;
-}
-
-/*!
- * Remove the page transition to the stack
- */
-wxWizardPageEx* CBOINCBaseWizard::PushPageTransition( wxWizardPageEx* pCurrentPage, unsigned long ulPageID )
-{
-    return _PushPageTransition( pCurrentPage, ulPageID );
-}
-
-wxWizardPageEx* CBOINCBaseWizard::_PushPageTransition( wxWizardPageEx* WXUNUSED(pCurrentPage), unsigned long WXUNUSED(ulPageID) )
-{
-    return NULL;
-}
-
-/*!
  * Process Cancel Event
  */
 bool CBOINCBaseWizard::IsCancelInProgress() const
diff --git a/clientgui/BOINCBaseWizard.h b/clientgui/BOINCBaseWizard.h
index 8ddc94f..9ba0085 100644
--- a/clientgui/BOINCBaseWizard.h
+++ b/clientgui/BOINCBaseWizard.h
@@ -40,10 +40,6 @@ public:
              long style = wxDEFAULT_DIALOG_STYLE);
 
     /// Track page transitions
-    wxWizardPageEx* PopPageTransition();
-    virtual wxWizardPageEx* _PopPageTransition();
-    wxWizardPageEx* PushPageTransition( wxWizardPageEx* pCurrentPage, unsigned long ulPageID );
-    virtual wxWizardPageEx* _PushPageTransition( wxWizardPageEx* pCurrentPage, unsigned long ulPageID );
     std::stack<wxWizardPageEx*> m_PageTransition;
 
     /// Cancel Event Infrastructure
diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp
index 9fa22c4..e05b455 100644
--- a/clientgui/MainDocument.cpp
+++ b/clientgui/MainDocument.cpp
@@ -23,6 +23,7 @@
 #include <wx/numformatter.h>
 
 #include "error_numbers.h"
+#include "str_replace.h"
 #include "util.h"
 #ifdef _WIN32
 #include "proc_control.h"
@@ -119,7 +120,7 @@ CNetworkConnection::~CNetworkConnection() {
 
 int CNetworkConnection::GetLocalPassword(wxString& strPassword){
     char buf[256];
-    strcpy(buf, "");
+    safe_strcpy(buf, "");
 
     FILE* f = fopen("gui_rpc_auth.cfg", "r");
     if (!f) return errno;
@@ -396,7 +397,7 @@ CMainDocument::CMainDocument() : rpc(this) {
     }
 #endif
 
-    strcpy(m_szLanguage, "");
+    safe_strcpy(m_szLanguage, "");
 
     m_bClientStartCheckCompleted = false;
 
@@ -937,7 +938,7 @@ void CMainDocument::RunPeriodicRPCs(int frameRefreshRate) {
 	static bool first = true;
 	if (first) {
 		first = false;
-        strcpy(m_szLanguage, wxGetApp().GetISOLanguageCode().mb_str());
+        safe_strcpy(m_szLanguage, wxGetApp().GetISOLanguageCode().mb_str());
 		request.clear();
 		request.which_rpc = RPC_SET_LANGUAGE;
 		request.arg1 = (void*)(const char*)&m_szLanguage;
diff --git a/clientgui/ProjectProcessingPage.cpp b/clientgui/ProjectProcessingPage.cpp
index 355dacb..c911cd5 100644
--- a/clientgui/ProjectProcessingPage.cpp
+++ b/clientgui/ProjectProcessingPage.cpp
@@ -318,7 +318,7 @@ void CProjectProcessingPage::OnPageChanged( wxWizardExEvent& event ) {
     wxASSERT(m_pProgressIndicator);
 
     m_pTitleStaticCtrl->SetLabel(
-        _("Communicating with project.")
+        _("Communicating with project\nPlease wait...")
     );
 
     SetProjectCommunicationsSucceeded(false);
@@ -416,8 +416,8 @@ void CProjectProcessingPage::OnStateChange( CProjectProcessingPageEvent& WXUNUSE
                 ai->ldap_auth = pWA->project_config.ldap_auth;
 
                 // Configure for project assigned hash lookup
-                ai->server_assigned_hash = pWA->GetProjectSetupCookie().size() ? 1 : 0;
-                ai->server_hash = (const char*)pWA->GetProjectSetupCookie().mb_str();
+                ai->server_assigned_cookie = pWA->GetProjectSetupCookie().size() ? 1 : 0;
+                ai->server_cookie = (const char*)pWA->GetProjectSetupCookie().mb_str();
 
                 if (pWA->m_AccountInfoPage->m_pAccountCreateCtrl->GetValue() && !pWA->GetProjectSetupCookie().size()) {
 					creating_account = true;
@@ -501,6 +501,15 @@ void CProjectProcessingPage::OnStateChange( CProjectProcessingPageEvent& WXUNUSE
                         (ERR_BAD_EMAIL_ADDR == ao->error_num) ||
                         (ERR_BAD_PASSWD == ao->error_num)
                     ) {
+                        if (!pWA->GetProjectAuthenticator().IsEmpty() || !pWA->GetProjectSetupCookie().IsEmpty()) {
+                            if (!pWA->GetProjectAuthenticator().IsEmpty()) {
+                                pWA->SetProjectAuthenticator(wxEmptyString);
+                            }
+                            if (!pWA->GetProjectSetupCookie().IsEmpty()) {
+                                pWA->SetProjectSetupCookie(wxEmptyString);
+                            }
+                            pWA->PushPage(ID_ACCOUNTINFOPAGE);
+                        }
                         SetProjectAccountNotFound(true);
                     } else {
                         SetProjectAccountNotFound(false);
diff --git a/clientgui/ProjectWelcomePage.cpp b/clientgui/ProjectWelcomePage.cpp
index 083c604..eec4a9b 100644
--- a/clientgui/ProjectWelcomePage.cpp
+++ b/clientgui/ProjectWelcomePage.cpp
@@ -196,10 +196,10 @@ wxWizardPageEx* CProjectWelcomePage::GetNext() const
     if (CHECK_CLOSINGINPROGRESS()) {
         // Cancel Event Detected
         return PAGE_TRANSITION_NEXT(ID_COMPLETIONERRORPAGE);
-    } else if (pWA->GetProjectAuthenticator().IsEmpty()) {
+    } else if (pWA->GetProjectAuthenticator().IsEmpty() && pWA->GetProjectSetupCookie().IsEmpty()) {
         return PAGE_TRANSITION_NEXT(ID_ACCOUNTINFOPAGE);
     } else {
-        return PAGE_TRANSITION_NEXT(ID_PROJECTPROCESSINGPAGE);
+        return PAGE_TRANSITION_NEXT(ID_PROJECTPROPERTIESPAGE);
     }
     return NULL;
 }
diff --git a/clientgui/WizardAttach.cpp b/clientgui/WizardAttach.cpp
index 481292e..927ae7b 100644
--- a/clientgui/WizardAttach.cpp
+++ b/clientgui/WizardAttach.cpp
@@ -292,9 +292,9 @@ bool CWizardAttach::Run(
     if (m_ProjectPropertiesPage && m_ProjectInfoPage && m_ProjectWelcomePage) {
         IsAttachToProjectWizard = true;
         IsAccountManagerWizard = false;
-        if (strProjectName.size() && strProjectURL.size() && (strProjectSetupCookie.size() == 0)) {
+        if (strProjectName.size() && strProjectURL.size() && ((strProjectSetupCookie.IsEmpty()) || !bEmbedded)) {
             return RunWizard(m_ProjectWelcomePage);
-        } else if (strProjectURL.size() && (IsCredentialsCached() || IsCredentialsDetected() || strProjectSetupCookie.size())) {
+        } else if (strProjectURL.size() && (IsCredentialsCached() || IsCredentialsDetected() || (strProjectSetupCookie.size() && bEmbedded))) {
             return RunWizard(m_ProjectPropertiesPage);
         } else {
             return RunWizard(m_ProjectInfoPage);
@@ -437,17 +437,81 @@ bool CWizardAttach::HasPrevPage( wxWizardPageEx* page )
         return false;
     return true;
 }
+
+/*!
+ * Translate a Page ID into the wxWizardPageEx instance pointer.
+ */
+
+wxWizardPageEx* CWizardAttach::TranslatePage(unsigned long ulPageID) {
+    wxWizardPageEx* pPage = NULL;
+
+    if (ID_PROJECTINFOPAGE == ulPageID)
+        pPage = m_ProjectInfoPage;
+ 
+    if (ID_PROJECTPROPERTIESPAGE == ulPageID)
+        pPage = m_ProjectPropertiesPage;
+ 
+    if (ID_PROJECTPROCESSINGPAGE == ulPageID)
+        pPage = m_ProjectProcessingPage;
+ 
+    if (ID_PROJECTWELCOMEPAGE == ulPageID)
+        pPage = m_ProjectWelcomePage;
+ 
+    if (ID_ACCOUNTMANAGERINFOPAGE == ulPageID)
+        pPage = m_AccountManagerInfoPage;
+ 
+    if (ID_ACCOUNTMANAGERPROPERTIESPAGE == ulPageID)
+        pPage = m_AccountManagerPropertiesPage;
+ 
+    if (ID_ACCOUNTMANAGERPROCESSINGPAGE == ulPageID)
+        pPage = m_AccountManagerProcessingPage;
+ 
+    if (ID_TERMSOFUSEPAGE == ulPageID)
+        pPage = m_TermsOfUsePage;
+ 
+    if (ID_ACCOUNTINFOPAGE == ulPageID)
+        pPage = m_AccountInfoPage;
+ 
+    if (ID_COMPLETIONPAGE == ulPageID)
+        pPage = m_CompletionPage;
  
+    if (ID_COMPLETIONERRORPAGE == ulPageID)
+        pPage = m_CompletionErrorPage;
+ 
+    if (ID_ERRNOTDETECTEDPAGE == ulPageID)
+        pPage = m_ErrNotDetectedPage;
+ 
+    if (ID_ERRUNAVAILABLEPAGE == ulPageID)
+        pPage = m_ErrUnavailablePage;
+ 
+    if (ID_ERRNOINTERNETCONNECTIONPAGE == ulPageID)
+        pPage = m_ErrNoInternetConnectionPage;
+ 
+    if (ID_ERRNOTFOUNDPAGE == ulPageID)
+        pPage = m_ErrNotFoundPage;
+ 
+    if (ID_ERRALREADYEXISTSPAGE == ulPageID)
+        pPage = m_ErrAlreadyExistsPage;
+ 
+    if (ID_ERRPROXYINFOPAGE == ulPageID)
+        pPage = m_ErrProxyInfoPage;
+ 
+    if (ID_ERRPROXYPAGE == ulPageID)
+        pPage = m_ErrProxyPage;
+
+    return pPage;
+}
+
 /*!
  * Remove the page transition from the stack.
  */
-wxWizardPageEx* CWizardAttach::_PopPageTransition() {
+wxWizardPageEx* CWizardAttach::PopPageTransition() {
     wxWizardPageEx* pPage = NULL;
     if (GetCurrentPage()) {
         if (!m_PageTransition.empty()) {
             pPage = m_PageTransition.top();
 
-            wxLogTrace(wxT("Function Status"), wxT("CWizardAttach::_PopPageTransition -     Popping Page: '%p'"), pPage);
+            wxLogTrace(wxT("Function Status"), wxT("CWizardAttach::PopPageTransition - Popping Page: '%p'"), pPage);
             m_PageTransition.pop();
 
             // TODO: Figure out the best way to handle the situation where the wizard has been launched with a
@@ -466,7 +530,7 @@ wxWizardPageEx* CWizardAttach::_PopPageTransition() {
                 //   with any server.
                 pPage = m_PageTransition.top();
 
-                wxLogTrace(wxT("Function Status"), wxT("CWizardAttach::_PopPageTransition -     Popping Page: '%p'"), pPage);
+                wxLogTrace(wxT("Function Status"), wxT("CWizardAttach::PopPageTransition - Popping Page: '%p'"), pPage);
                 m_PageTransition.pop();
 
             }
@@ -476,75 +540,38 @@ wxWizardPageEx* CWizardAttach::_PopPageTransition() {
     }
     return NULL;
 }
- 
+
+
 /*!
- * Add the page transition to the stack.
+ * Push a page onto the stack.
  */
-wxWizardPageEx* CWizardAttach::_PushPageTransition( wxWizardPageEx* pCurrentPage, unsigned long ulPageID ) {
+
+wxWizardPageEx* CWizardAttach::PushPage( unsigned long ulPageID ) {
     if (GetCurrentPage()) {
-        wxWizardPageEx* pPage = NULL;
+        wxWizardPageEx* pPage = TranslatePage(ulPageID);
+        if (pPage) {
+            wxLogTrace(wxT("Function Status"), wxT("CWizardAttach::PushPage - Pushing Page: '%p'"), pPage);
+            m_PageTransition.push(pPage);
+            return pPage;
+        }
+    }
+    return NULL;
+}
 
-        if (ID_PROJECTINFOPAGE == ulPageID)
-            pPage = m_ProjectInfoPage;
- 
-        if (ID_PROJECTPROPERTIESPAGE == ulPageID)
-            pPage = m_ProjectPropertiesPage;
- 
-        if (ID_PROJECTPROCESSINGPAGE == ulPageID)
-            pPage = m_ProjectProcessingPage;
- 
-        if (ID_PROJECTWELCOMEPAGE == ulPageID)
-            pPage = m_ProjectWelcomePage;
- 
-        if (ID_ACCOUNTMANAGERINFOPAGE == ulPageID)
-            pPage = m_AccountManagerInfoPage;
- 
-        if (ID_ACCOUNTMANAGERPROPERTIESPAGE == ulPageID)
-            pPage = m_AccountManagerPropertiesPage;
- 
-        if (ID_ACCOUNTMANAGERPROCESSINGPAGE == ulPageID)
-            pPage = m_AccountManagerProcessingPage;
- 
-        if (ID_TERMSOFUSEPAGE == ulPageID)
-            pPage = m_TermsOfUsePage;
- 
-        if (ID_ACCOUNTINFOPAGE == ulPageID)
-            pPage = m_AccountInfoPage;
- 
-        if (ID_COMPLETIONPAGE == ulPageID)
-            pPage = m_CompletionPage;
- 
-        if (ID_COMPLETIONERRORPAGE == ulPageID)
-            pPage = m_CompletionErrorPage;
- 
-        if (ID_ERRNOTDETECTEDPAGE == ulPageID)
-            pPage = m_ErrNotDetectedPage;
- 
-        if (ID_ERRUNAVAILABLEPAGE == ulPageID)
-            pPage = m_ErrUnavailablePage;
- 
-        if (ID_ERRNOINTERNETCONNECTIONPAGE == ulPageID)
-            pPage = m_ErrNoInternetConnectionPage;
- 
-        if (ID_ERRNOTFOUNDPAGE == ulPageID)
-            pPage = m_ErrNotFoundPage;
- 
-        if (ID_ERRALREADYEXISTSPAGE == ulPageID)
-            pPage = m_ErrAlreadyExistsPage;
- 
-        if (ID_ERRPROXYINFOPAGE == ulPageID)
-            pPage = m_ErrProxyInfoPage;
- 
-        if (ID_ERRPROXYPAGE == ulPageID)
-            pPage = m_ErrProxyPage;
- 
+
+/*!
+ * Add the page transition to the stack.
+ */
+wxWizardPageEx* CWizardAttach::PushPageTransition( wxWizardPageEx* pCurrentPage, unsigned long ulPageID ) {
+    if (GetCurrentPage()) {
+        wxWizardPageEx* pPage = TranslatePage(ulPageID);
         if (pPage) {
             if (m_PageTransition.empty()) {
-                wxLogTrace(wxT("Function Status"), wxT("CWizardAttach::_PushPageTransition -     Pushing Page: '%p'"), pPage);
+                wxLogTrace(wxT("Function Status"), wxT("CWizardAttach::PushPageTransition - Pushing Page: '%p'"), pPage);
                 m_PageTransition.push(NULL);
             }
             if (m_PageTransition.top() != pCurrentPage) {
-                wxLogTrace(wxT("Function Status"), wxT("CWizardAttach::_PushPageTransition -     Pushing Page: '%p'"), pPage);
+                wxLogTrace(wxT("Function Status"), wxT("CWizardAttach::PushPageTransition - Pushing Page: '%p'"), pPage);
                 m_PageTransition.push(pCurrentPage);
             }
             return pPage;
diff --git a/clientgui/WizardAttach.h b/clientgui/WizardAttach.h
index 94ad4f5..6fbabc3 100644
--- a/clientgui/WizardAttach.h
+++ b/clientgui/WizardAttach.h
@@ -175,16 +175,16 @@ struct PROJECT_INIT_STATUS;
 // Commonly defined macros
 //
 #define PAGE_TRANSITION_NEXT(id) \
-    ((CBOINCBaseWizard*)GetParent())->PushPageTransition((wxWizardPageEx*)this, id)
+    ((CWizardAttach*)GetParent())->PushPageTransition((wxWizardPageEx*)this, id)
  
 #define PAGE_TRANSITION_BACK \
-    ((CBOINCBaseWizard*)GetParent())->PopPageTransition()
+    ((CWizardAttach*)GetParent())->PopPageTransition()
  
 #define PROCESS_CANCELEVENT(event) \
-    ((CBOINCBaseWizard*)GetParent())->ProcessCancelEvent(event)
+    ((CWizardAttach*)GetParent())->ProcessCancelEvent(event)
 
 #define CHECK_CLOSINGINPROGRESS() \
-    ((CBOINCBaseWizard*)GetParent())->IsCancelInProgress()
+    ((CWizardAttach*)GetParent())->IsCancelInProgress()
 
 
 /*!
@@ -250,8 +250,10 @@ public:
     virtual bool HasPrevPage( wxWizardPageEx* page );
 
     /// Track page transitions
-    wxWizardPageEx* _PopPageTransition();
-    wxWizardPageEx* _PushPageTransition( wxWizardPageEx* pCurrentPage, unsigned long ulPageID );
+    wxWizardPageEx* TranslatePage(unsigned long ulPageID);
+    wxWizardPageEx* PopPageTransition();
+    wxWizardPageEx* PushPage( unsigned long ulPageID );
+    wxWizardPageEx* PushPageTransition( wxWizardPageEx* pCurrentPage, unsigned long ulPageID );
 
     /// Cancel Event Infrastructure
     void _ProcessCancelEvent( wxWizardExEvent& event );
diff --git a/clientgui/browser.cpp b/clientgui/browser.cpp
index 312c6e3..831bc70 100644
--- a/clientgui/browser.cpp
+++ b/clientgui/browser.cpp
@@ -44,6 +44,7 @@ BOOL WINAPI InternetGetCookieA( LPCSTR lpszUrl, LPCSTR lpszCookieName, LPSTR lps
 
 #include <sqlite3.h>
 #include "error_numbers.h"
+#include "str_replace.h"
 #include "mfile.h"
 #include "miofile.h"
 #include "str_util.h"
@@ -367,9 +368,9 @@ static int find_site_cookie_mozilla_v3(
     long long expires;
 
 
-    strcpy(host, "");
-    strcpy(cookie_name, "");
-    strcpy(cookie_value, "");
+    safe_strcpy(host, "");
+    safe_strcpy(cookie_name, "");
+    safe_strcpy(cookie_value, "");
     expires = 0;
 
     sscanf( argv[0], "%255s", host );
@@ -567,9 +568,9 @@ static int find_site_cookie_chrome(
     long long expires;
     long httponly;
 
-    strcpy(host, "");
-    strcpy(cookie_name, "");
-    strcpy(cookie_value, "");
+    safe_strcpy(host, "");
+    safe_strcpy(cookie_name, "");
+    safe_strcpy(cookie_value, "");
     expires = 0;
 
     sscanf( argv[0], "%255s", host );
diff --git a/clientgui/sg_ProjectPanel.cpp b/clientgui/sg_ProjectPanel.cpp
index 602962f..030da1b 100644
--- a/clientgui/sg_ProjectPanel.cpp
+++ b/clientgui/sg_ProjectPanel.cpp
@@ -526,12 +526,12 @@ void CSimpleProjectPanel::UpdateProjectList() {
 
 
 std::string CSimpleProjectPanel::GetProjectIconLoc(char* project_url) {
-    char urlDirectory[256];
+    char proj_dir[256];
     CMainDocument* pDoc = wxGetApp().GetDocument();
     PROJECT* project = pDoc->state.lookup_project(project_url);
     if (!project) return (std::string)"";
-    url_to_project_dir(project->master_url, urlDirectory);
-    return (std::string)urlDirectory + "/stat_icon";
+    url_to_project_dir(project->master_url, proj_dir, sizeof(proj_dir));
+    return (std::string)proj_dir + "/stat_icon";
 }
 
 
diff --git a/clientgui/sg_TaskPanel.cpp b/clientgui/sg_TaskPanel.cpp
index 7a0c2fc..2bb7c19 100644
--- a/clientgui/sg_TaskPanel.cpp
+++ b/clientgui/sg_TaskPanel.cpp
@@ -495,6 +495,7 @@ CSimpleTaskPanel::CSimpleTaskPanel( wxWindow* parent ) :
     wxBoxSizer* bSizer3;
     bSizer3 = new wxBoxSizer( wxHORIZONTAL );
     
+    // what project the task is from, e.g. "From: SETI at home"
     m_TaskProjectLabel = new CTransparentStaticText( this, wxID_ANY, _("From:"), wxDefaultPosition, wxDefaultSize, 0 );
     m_TaskProjectLabel->Wrap( -1 );
     bSizer3->Add( m_TaskProjectLabel, 0, wxRIGHT, ADJUSTFORXDPI(5) );
@@ -817,10 +818,11 @@ void CSimpleTaskPanel::GetApplicationAndProjectNames(RESULT* result, wxString* a
             strAppBuffer = wxString(state_result->avp->app_name, wxConvUTF8);
         }
         
-        char buf[256];
         if (avp->gpu_type) {
-            sprintf(buf, " (%s)", proc_type_name(avp->gpu_type));
-            strGPUBuffer = wxString(buf, wxConvUTF8);
+            strGPUBuffer.Printf(
+                wxT(" (%s)"),
+                wxString(proc_type_name(avp->gpu_type), wxConvUTF8).c_str()
+            );
         }
 
         appName->Printf(
@@ -884,7 +886,7 @@ wxString CSimpleTaskPanel::GetStatusString(RESULT* result) {
 
 void CSimpleTaskPanel::FindSlideShowFiles(TaskSelectionData *selData) {
     RESULT* state_result;
-    char urlDirectory[1024];
+    char proj_dir[1024];
     char fileName[1024];
     char resolvedFileName[1024];
     int j;
@@ -899,9 +901,9 @@ void CSimpleTaskPanel::FindSlideShowFiles(TaskSelectionData *selData) {
         state_result = pDoc->state.lookup_result(selData->result->project_url, selData->result->name);
     }
     if (state_result) {
-        url_to_project_dir(state_result->project->master_url, urlDirectory);
+        url_to_project_dir(state_result->project->master_url, proj_dir, sizeof(proj_dir));
         for(j=0; j<99; ++j) {
-            sprintf(fileName, "%s/slideshow_%s_%02d", urlDirectory, state_result->app->name, j);
+            snprintf(fileName, sizeof(fileName), "%s/slideshow_%s_%02d", proj_dir, state_result->app->name, j);
             if(boinc_resolve_filename(fileName, resolvedFileName, sizeof(resolvedFileName)) == 0) {
                 if (boinc_file_exists(resolvedFileName)) {
                     selData->slideShowFileNames.Add(wxString(resolvedFileName,wxConvUTF8));
@@ -913,7 +915,7 @@ void CSimpleTaskPanel::FindSlideShowFiles(TaskSelectionData *selData) {
 
         if ( selData->slideShowFileNames.size() == 0 ) {
             for(j=0; j<99; ++j) {
-                sprintf(fileName, "%s/slideshow_%02d", urlDirectory, j);
+                snprintf(fileName, sizeof(fileName), "%s/slideshow_%02d", proj_dir, j);
                 if(boinc_resolve_filename(fileName, resolvedFileName, sizeof(resolvedFileName)) == 0) {
                     if (boinc_file_exists(resolvedFileName)) {
                         selData->slideShowFileNames.Add(wxString(resolvedFileName,wxConvUTF8));
diff --git a/clientscr/ss_app.cpp b/clientscr/ss_app.cpp
index 13deada..12d4411 100644
--- a/clientscr/ss_app.cpp
+++ b/clientscr/ss_app.cpp
@@ -31,6 +31,10 @@
 #include <sys/socket.h>
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #include "boinc_gl.h"
 
 #include "diagnostics.h"
@@ -120,7 +124,7 @@ struct PROJECT_IMAGES {
 vector<PROJECT_IMAGES> project_images;
 void icon_path(PROJECT* p, char* buf) {
     char dir[256];
-    url_to_project_dir((char*)p->master_url.c_str(), dir);
+    url_to_project_dir((char*)p->master_url.c_str(), dir, sizeof(dir));
     sprintf(buf, "%s/stat_icon", dir);
 }
 
@@ -128,7 +132,7 @@ void slideshow(PROJECT* p) {
     char dir[256], buf[256];
     int i;
 
-    url_to_project_dir((char*)p->master_url.c_str(), dir);
+    url_to_project_dir((char*)p->master_url.c_str(), dir, sizeof(dir));
     for (i=0; i<99; i++) {
         sprintf(buf, "%s/slideshow_%02d", dir, i);
     }
@@ -144,7 +148,7 @@ PROJECT_IMAGES* get_project_images(PROJECT* p) {
     }
     PROJECT_IMAGES pim;
     pim.url = p->master_url;
-    url_to_project_dir((char*)p->master_url.c_str(), dir);
+    url_to_project_dir((char*)p->master_url.c_str(), dir, sizeof(dir));
     sprintf(path, "%s/stat_icon", dir);
     boinc_resolve_filename(path, filename, 256);
     pim.icon.load_image_file(filename);
@@ -199,14 +203,14 @@ void show_result(RESULT* r, float x, float& y, float alpha) {
     float prog_ci[] = {.1, .8, .2, alpha};
     progress.init(prog_pos, .4, -.01, -0.008, prog_c, prog_ci);
     progress.draw(r->fraction_done);
-    sprintf(buf, "%.2f%% ", r->fraction_done*100);
+    snprintf(buf, sizeof(buf), "%.2f%% ", r->fraction_done*100);
     ttf_render_string(x+.41, y, 0, TASK_INFO_SIZE, white, buf);
     y -= .03;
     x += .05;
-    sprintf(buf, "Elapsed: %.0f sec  Remaining: %.0f sec", r->elapsed_time, r->estimated_cpu_time_remaining);
+    snprintf(buf, sizeof(buf), "Elapsed: %.0f sec  Remaining: %.0f sec", r->elapsed_time, r->estimated_cpu_time_remaining);
     ttf_render_string(x, y, 0, TASK_INFO_SIZE, white, buf);
     y -= .03;
-    sprintf(buf, "App: %s  Task: %s", r->app->user_friendly_name, r->wup->name);
+    snprintf(buf, sizeof(buf), "App: %s  Task: %s", r->app->user_friendly_name, r->wup->name);
     ttf_render_string(x, y, 0, TASK_INFO_SIZE, white, buf);
     y -= .03;
 }
@@ -238,15 +242,15 @@ void show_project(unsigned int index, float alpha) {
     y -= .07;
     ttf_render_string(x, y, 0, PROJ_INFO_SIZE, white, p->master_url);
     y -= .05;
-    sprintf(buf, "User: %s", p->user_name.c_str());
+    snprintf(buf, sizeof(buf), "User: %s", p->user_name.c_str());
     ttf_render_string(x, y, 0, PROJ_INFO_SIZE, white, buf);
     y -= .05;
     if (p->team_name.size()) {
-        sprintf(buf, "Team: %s",  p->team_name.c_str());
+        snprintf(buf, sizeof(buf), "Team: %s",  p->team_name.c_str());
         ttf_render_string(x, y, 0, PROJ_INFO_SIZE, white, buf);
         y -= .05;
     }
-    sprintf(buf, "Total credit: %.0f   Average credit: %.0f", p->user_total_credit, p->user_expavg_credit);
+    snprintf(buf, sizeof(buf), "Total credit: %.0f   Average credit: %.0f", p->user_total_credit, p->user_expavg_credit);
     ttf_render_string(x, y, 0, PROJ_INFO_SIZE, white, buf);
     y -= .05;
     if (p->suspended_via_gui) {
@@ -257,17 +261,17 @@ void show_project(unsigned int index, float alpha) {
 void show_disconnected() {
     float x=.3, y=.3;
     char buf[256];
-    sprintf(buf, "%s is not running.", brand_name);
+    snprintf(buf, sizeof(buf), "%s is not running.", brand_name);
     ttf_render_string(x, y, 0, ALERT_SIZE, white, buf);
 }
 
 void show_no_projects() {
     float x=.2, y=.3;
     char buf[256];
-    sprintf(buf, "%s is not attached to any projects.", brand_name);
+    snprintf(buf, sizeof(buf), "%s is not attached to any projects.", brand_name);
     ttf_render_string(x, y, 0, ALERT_SIZE, white, buf);
     y = .25;
-    sprintf(buf, "Attach to projects using %s.", brand_name);
+    snprintf(buf, sizeof(buf), "Attach to projects using %s.", brand_name);
     ttf_render_string(x, y, 0, ALERT_SIZE, white, buf);
 }
 
@@ -318,7 +322,7 @@ void show_jobs(unsigned int index, double alpha) {
         case SUSPEND_REASON_NO_RECENT_INPUT:
             p = "Computing suspended while computer not in use"; break;
         case SUSPEND_REASON_INITIAL_DELAY:
-            sprintf(buf,
+            snprintf(buf, sizeof(buf),
                 "Computing suspended while %s is starting up", brand_name
             );
             p = buf;
diff --git a/configure.ac b/configure.ac
index 4aa1b98..4fb1387 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,7 @@ dnl not sure exactly what the minimum version is (but 2.13 wont work)
 AC_PREREQ(2.58)
 
 dnl Set the BOINC version here.  You can also use the set-version script.
-AC_INIT(BOINC, 7.6.25)
+AC_INIT(BOINC, 7.6.28)
 AC_CONFIG_MACRO_DIR([m4])
 LIBBOINC_VERSION=`echo ${PACKAGE_VERSION} | sed 's/\./:/g'`
 AC_SUBST([LIBBOINC_VERSION])
diff --git a/lib/app_ipc.cpp b/lib/app_ipc.cpp
index 69548e7..8627c27 100644
--- a/lib/app_ipc.cpp
+++ b/lib/app_ipc.cpp
@@ -25,6 +25,10 @@
 #include <string>
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #include "error_numbers.h"
 #include "filesys.h"
 #include "miofile.h"
@@ -472,7 +476,7 @@ int boinc_resolve_filename(
     // must initialize buf since fgets() on an empty file won't do anything
     //
     buf[0] = 0;
-    p =fgets(buf, sizeof(buf), fp);
+    p = fgets(buf, sizeof(buf), fp);
     fclose(fp);
 
     // If it's the <soft_link> XML tag, return its value,
@@ -505,9 +509,34 @@ int boinc_resolve_filename_s(const char *virtual_name, string& physical_name) {
     return 0;
 }
 
-void url_to_project_dir(char* url, char* dir) {
+// if the given file is a soft link of the form ../../project_dir/x,
+// return x, else return empty string
+//
+string resolve_soft_link(const char* project_dir, const char* file) {
+    char buf[1024], physical_name[1024];
+    FILE* fp = boinc_fopen(file, "r");
+    if (!fp) {
+        return string("");
+    }
+    buf[0] = 0;
+    char* p = fgets(buf, sizeof(buf), fp);
+    fclose(fp);
+    if (!p) {
+        return string("");
+    }
+    if (!parse_str(buf, "<soft_link>", physical_name, sizeof(physical_name))) {
+        return string("");
+    }
+    snprintf(buf, sizeof(buf), "../../%s/", project_dir);
+    if (strstr(physical_name, buf) != physical_name) {
+        return string("");
+    }
+    return string(physical_name + strlen(buf));
+}
+
+void url_to_project_dir(char* url, char* dir, int dirsize) {
     char buf[256];
     escape_project_url(url, buf);
-    sprintf(dir, "%s/%s", PROJECT_DIR, buf);
+    snprintf(dir, dirsize, "%s/%s", PROJECT_DIR, buf);
 }
 
diff --git a/lib/app_ipc.h b/lib/app_ipc.h
index 6225d08..3ec4a1b 100644
--- a/lib/app_ipc.h
+++ b/lib/app_ipc.h
@@ -251,7 +251,8 @@ int parse_graphics_file(FILE* f, GRAPHICS_INFO* gi);
 
 extern int boinc_link(const char* phys_name, const char* logical_name);
 extern int boinc_resolve_filename_s(const char*, std::string&);
-extern void url_to_project_dir(char* url, char* dir);
+extern std::string resolve_soft_link(const char* project_dir, const char* file);
+extern void url_to_project_dir(char* url, char* dir, int dirsize);
 
 extern "C" {
 #endif
diff --git a/lib/boinc_win.h b/lib/boinc_win.h
index da9f8e2..9227f1f 100644
--- a/lib/boinc_win.h
+++ b/lib/boinc_win.h
@@ -101,15 +101,12 @@
 // platforms we are going to disable the deprecation warnings if we are compiling
 // on Visual Studio 2005
 #if _MSC_VER >= 1400
-
 #ifndef _CRT_SECURE_NO_DEPRECATE
 #define _CRT_SECURE_NO_DEPRECATE
 #endif
-
 #ifndef _CRT_SECURE_NO_WARNINGS
 #define _CRT_SECURE_NO_WARNINGS
 #endif
-
 #endif
 
 // Target Windows XP or better with Internet Explorer 5.01 or better
diff --git a/lib/common_defs.h b/lib/common_defs.h
index 6ccce96..9c8e0ba 100644
--- a/lib/common_defs.h
+++ b/lib/common_defs.h
@@ -20,6 +20,7 @@
 
 #include "miofile.h"
 #include "parse.h"
+#include "str_replace.h"
 
 // #defines or enums that are shared by more than one BOINC component
 // (e.g. client, server, Manager, etc.)
@@ -344,7 +345,7 @@ struct DEVICE_STATUS {
         battery_temperature_celsius = 0;
         wifi_online = false;
         user_active = false;
-        strcpy(device_name, "");
+        safe_strcpy(device_name, "");
     }
 };
 
diff --git a/lib/coproc.cpp b/lib/coproc.cpp
index f0681d7..09a2368 100644
--- a/lib/coproc.cpp
+++ b/lib/coproc.cpp
@@ -60,7 +60,7 @@ using std::perror;
 #endif
 
 int COPROC_REQ::parse(XML_PARSER& xp) {
-    strcpy(type, "");
+    safe_strcpy(type, "");
     count = 0;
     while (!xp.get_tag()) {
         if (xp.match_tag("/coproc")) {
@@ -136,7 +136,7 @@ void COPROC::write_request(MIOFILE& f) {
 
 int COPROC::parse(XML_PARSER& xp) {
     char buf[256];
-    strcpy(type, "");
+    safe_strcpy(type, "");
     clear();
     for (int i=0; i<MAX_COPROC_INSTANCES; i++) {
         device_nums[i] = i;
@@ -170,7 +170,7 @@ int COPROC::parse(XML_PARSER& xp) {
 void COPROCS::summary_string(char* buf, int len) {
     char buf2[1024];
 
-    strcpy(buf, "");
+    strlcpy(buf, "", len);
     if (nvidia.count) {
         int mem = (int)(nvidia.prop.totalGlobalMem/MEGA);
         snprintf(buf2, sizeof(buf2),
@@ -207,7 +207,7 @@ int COPROCS::parse(XML_PARSER& xp) {
 
     clear();
     n_rsc = 1;
-    strcpy(coprocs[0].type, "CPU");
+    safe_strcpy(coprocs[0].type, "CPU");
     while (!xp.get_tag()) {
         if (xp.match_tag("/coprocs")) {
             return 0;
@@ -283,21 +283,21 @@ void COPROC_NVIDIA::description(char* buf, int buflen) {
      	int maj = display_driver_version >> 16;
     	int min = (display_driver_version >> 8) & 0xff;
     	int rev = display_driver_version & 0xff;
-        sprintf(vers, "%d.%d.%d", maj, min, rev);
+        snprintf(vers, sizeof(vers), "%d.%d.%d", maj, min, rev);
 #else
         int maj = display_driver_version/100;
         int min = display_driver_version%100;
-        sprintf(vers, "%d.%02d", maj, min);
+        snprintf(vers, sizeof(vers), "%d.%02d", maj, min);
 #endif
     } else {
-        strcpy(vers, "unknown");
+        safe_strcpy(vers, "unknown");
     }
     if (cuda_version) {
         int maj = cuda_version/1000;
         int min = (cuda_version%1000)/10;
-        sprintf(cuda_vers, "%d.%d", maj, min);
+        snprintf(cuda_vers, sizeof(cuda_vers), "%d.%d", maj, min);
     } else {
-        strcpy(cuda_vers, "unknown");
+        safe_strcpy(cuda_vers, "unknown");
     }
     snprintf(buf, buflen,
         "%s (driver version %s, CUDA version %s, compute capability %d.%d, %.0fMB, %.0fMB available, %.0f GFLOPS peak)",
@@ -383,8 +383,8 @@ void COPROC_NVIDIA::clear() {
     estimated_delay = -1;   // mark as absent
     cuda_version = 0;
     display_driver_version = 0;
-    strcpy(prop.name, "");
-    prop.totalGlobalMem = 0;
+    safe_strcpy(prop.name, "");
+    prop.totalGlobalMem = 0.0;
     prop.sharedMemPerBlock = 0;
     prop.regsPerBlock = 0;
     prop.warpSize = 0;
@@ -415,7 +415,7 @@ int COPROC_NVIDIA::parse(XML_PARSER& xp) {
     while (!xp.get_tag()) {
         if (xp.match_tag("/coproc_cuda")) {
             if (!peak_flops) {
-				set_peak_flops();
+                set_peak_flops();
             }
             if (!available_ram) {
                 available_ram = prop.totalGlobalMem;
@@ -563,7 +563,7 @@ void COPROC_NVIDIA::set_peak_flops() {
 void COPROC_NVIDIA::fake(
     int driver_version, double ram, double avail_ram, int n
 ) {
-   strcpy(type, proc_type_name_xml(PROC_TYPE_NVIDIA_GPU));
+   safe_strcpy(type, proc_type_name_xml(PROC_TYPE_NVIDIA_GPU));
    count = n;
    for (int i=0; i<count; i++) {
        device_nums[i] = i;
@@ -673,8 +673,8 @@ void COPROC_ATI::clear() {
     COPROC::clear();
     safe_strcpy(type, proc_type_name_xml(PROC_TYPE_AMD_GPU));
     estimated_delay = -1;
-    strcpy(name, "");
-    strcpy(version, "");
+    safe_strcpy(name, "");
+    safe_strcpy(version, "");
     atirt_detected = false;
     amdrt_detected = false;
     memset(&attribs, 0, sizeof(attribs));
@@ -882,8 +882,8 @@ void COPROC_INTEL::clear() {
     COPROC::clear();
     safe_strcpy(type, proc_type_name_xml(PROC_TYPE_INTEL_GPU));
     estimated_delay = -1;
-    strcpy(name, "");
-    strcpy(version, "");
+    safe_strcpy(name, "");
+    safe_strcpy(version, "");
     global_mem_size = 0;
     is_used = COPROC_USED;
 }
diff --git a/lib/coproc.h b/lib/coproc.h
index b758d69..0d25829 100644
--- a/lib/coproc.h
+++ b/lib/coproc.h
@@ -88,6 +88,7 @@
 #include "cal_boinc.h"
 #include "cl_boinc.h"
 #include "opencl_boinc.h"
+#include "str_replace.h"
 
 #define MAX_COPROC_INSTANCES 64
 #define MAX_RSC 8
@@ -437,7 +438,7 @@ struct COPROCS {
         ati.clear();
         intel_gpu.clear();
         COPROC c;
-        strcpy(c.type, "CPU");
+        safe_strcpy(c.type, "CPU");
         c.clear_usage();
         add(c);
     }
@@ -501,7 +502,7 @@ struct COPROCS {
         ati.count = 0;
         intel_gpu.count = 0;
         COPROC c;
-        strcpy(c.type, "CPU");
+        safe_strcpy(c.type, "CPU");
         c.clear_usage();
         add(c);
     }
diff --git a/lib/diagnostics.cpp b/lib/diagnostics.cpp
index 6d0e4d4..b23e611 100644
--- a/lib/diagnostics.cpp
+++ b/lib/diagnostics.cpp
@@ -62,6 +62,8 @@
 #include "util.h"
 #include "str_replace.h"
 #include "parse.h"
+#include "str_replace.h"
+
 
 #include "diagnostics.h"
 
@@ -108,7 +110,7 @@ static double      stdout_file_size = 0;
 static double      max_stdout_file_size = 2048*1024;
 
 #ifdef ANDROID
-static void *libhandle;
+static void*       libhandle;
 #endif
 
 #ifdef _WIN32
@@ -256,15 +258,15 @@ int diagnostics_init(
     // Setup initial values
     //
     flags = _flags;
-    strcpy(stdout_log, "");
-    strcpy(stdout_archive, "");
-    strcpy(stderr_log, "");
-    strcpy(stderr_archive, "");
-    strcpy(boinc_dir, "");
-    strcpy(boinc_install_dir, "");
+    safe_strcpy(stdout_log, "");
+    safe_strcpy(stdout_archive, "");
+    safe_strcpy(stderr_log, "");
+    safe_strcpy(stderr_archive, "");
+    safe_strcpy(boinc_dir, "");
+    safe_strcpy(boinc_install_dir, "");
     boinc_proxy_enabled = 0;
-    strcpy(boinc_proxy, "");
-    strcpy(symstore, "");
+    safe_strcpy(boinc_proxy, "");
+    safe_strcpy(symstore, "");
 
     
     // Check for invalid parameter combinations
@@ -285,13 +287,13 @@ int diagnostics_init(
 
 #if   defined(_WIN32)
         snprintf(user_dir, sizeof(user_dir), "%s", getenv("APPDATA"));
-        strncat(user_dir, "/BOINC", sizeof(user_dir) - strlen(user_dir)-1);
+        safe_strcat(user_dir, "/BOINC");
 #elif defined(__APPLE__)
         snprintf(user_dir, sizeof(user_dir), "%s", getenv("HOME"));
-        strncat(user_dir, "/Library/Application Support/BOINC", sizeof(user_dir) - strlen(user_dir)-1);
+        safe_strcat(user_dir, "/Library/Application Support/BOINC");
 #else
         snprintf(user_dir, sizeof(user_dir), "%s", getenv("HOME"));
-        strncat(user_dir, "/.BOINC", sizeof(user_dir) - strlen(user_dir)-1);
+        safe_strcat(user_dir, "/.BOINC");
 #endif
 
         // Check to see if the directory exists
@@ -449,8 +451,8 @@ int diagnostics_init(
         DWORD   dwSize = 0;
 #endif
 
-        strcpy(buf, "");
-        strcpy(proxy_address, "");
+        safe_strcpy(buf, "");
+        safe_strcpy(proxy_address, "");
         proxy_port = 0;
 
 #ifndef _USING_FCGI_
diff --git a/lib/diagnostics_win.cpp b/lib/diagnostics_win.cpp
index b4e0ae4..9e181c9 100644
--- a/lib/diagnostics_win.cpp
+++ b/lib/diagnostics_win.cpp
@@ -40,6 +40,7 @@
 #include "diagnostics.h"
 #include "error_numbers.h"
 #include "str_util.h"
+#include "str_replace.h"
 #include "util.h"
 #include "version.h"
 
@@ -153,7 +154,7 @@ int diagnostics_init_thread_entry(PBOINC_THREADLISTENTRY entry) {
     entry->crash_state = 0;
     entry->crash_wait_reason = 0;
     entry->crash_exception_record = NULL;
-    strncpy(entry->crash_message, "", sizeof(entry->crash_message));
+    strlcpy(entry->crash_message, "", sizeof(entry->crash_message));
     return 0;
 }
 
@@ -1197,8 +1198,8 @@ int diagnostics_capture_foreground_window(PBOINC_WINDOWCAPTURE window_info) {
 
 
     // Initialize structure variables.
-	strcpy(window_info->window_name, "");
-	strcpy(window_info->window_class, "");
+	safe_strcpy(window_info->window_name, "");
+	safe_strcpy(window_info->window_class, "");
     window_info->hwnd = 0;
     window_info->window_process_id = 0;
     window_info->window_thread_id = 0;
@@ -1429,18 +1430,18 @@ int diagnostics_dump_exception_record(PEXCEPTION_POINTERS pExPtrs) {
             diagnostics_dump_generic_exception("Out Of Memory (C++ Exception)", exception_code, exception_address);
             break;
         case EXCEPTION_ACCESS_VIOLATION:
-            strcpy(status, "Access Violation");
-            strcpy(substatus, "");
+            safe_strcpy(status, "Access Violation");
+            safe_strcpy(substatus, "");
             if (pExPtrs->ExceptionRecord->NumberParameters == 2) {
                 switch(pExPtrs->ExceptionRecord->ExceptionInformation[0]) {
                 case 0: // read attempt
-                    sprintf(substatus,
+                    snprintf(substatus, sizeof(substatus),
                         "read attempt to address 0x%8.8X",
                         pExPtrs->ExceptionRecord->ExceptionInformation[1]
                     );
                     break;
                 case 1: // write attempt
-                    sprintf(substatus,
+                    snprintf(substatus, sizeof(substatus),
                         "write attempt to address 0x%8.8X",
                         pExPtrs->ExceptionRecord->ExceptionInformation[1]
                     );
diff --git a/lib/filesys.cpp b/lib/filesys.cpp
index b75f9c9..21368fe 100644
--- a/lib/filesys.cpp
+++ b/lib/filesys.cpp
@@ -26,8 +26,9 @@
 #include <fcntl.h>
 #endif
 
-#ifdef _MSC_VER
-#define getcwd  _getcwd
+#if  defined(_MSC_VER) || defined(__MINGW32__)
+#define getcwd    _getcwd
+#define snprintf  _snprintf
 #endif
 
 #if !defined(_WIN32) || defined(__CYGWIN32__)
@@ -142,7 +143,7 @@ DIRREF dir_open(const char* p) {
     }
     dirp->first = true;
     safe_strcpy(dirp->path, p);
-    strcat(dirp->path, "\\*");
+    safe_strcat(dirp->path, "\\*");
     dirp->handle = INVALID_HANDLE_VALUE;
 #else
     dirp = opendir(p);
@@ -385,10 +386,13 @@ int clean_out_dir(const char* dirpath) {
     dirp = dir_open(dirpath);
     if (!dirp) return 0;    // if dir doesn't exist, it's empty
     while (1) {
-        strcpy(filename, "");
+        safe_strcpy(filename, "");
         retval = dir_scan(filename, dirp, sizeof(filename));
         if (retval) break;
-        sprintf(path, "%s/%s", dirpath,  filename);
+
+        snprintf(path, sizeof(path), "%s/%s", dirpath,  filename);
+        path[sizeof(path)-1] = 0;
+
         clean_out_dir(path);
         boinc_rmdir(path);
         retval = boinc_delete_file(path);
@@ -407,10 +411,15 @@ int clean_out_dir(const char* dirpath) {
 //
 int dir_size(const char* dirpath, double& size, bool recurse) {
 #ifdef WIN32
+    char buf[_MAX_PATH];
     char path2[_MAX_PATH];
-    sprintf(path2, "%s/*", dirpath);
-    size = 0.0;
+    double dsize = 0.0;
     WIN32_FIND_DATAA findData;
+
+    size = 0.0;
+    snprintf(path2, sizeof(path2), "%s/*", dirpath);
+    path2[sizeof(path2)-1] = 0;
+
     HANDLE hFind = ::FindFirstFileA(path2, &findData);
     if (INVALID_HANDLE_VALUE == hFind) return ERR_OPENDIR;
     do {
@@ -419,29 +428,34 @@ int dir_size(const char* dirpath, double& size, bool recurse) {
             if (!strcmp(findData.cFileName, ".")) continue;
             if (!strcmp(findData.cFileName, "..")) continue;
 
-            double dsize = 0;
-            char buf[_MAX_PATH];
-            ::sprintf(buf, "%s/%s", dirpath, findData.cFileName);
+            dsize = 0.0;
+
+            snprintf(buf, sizeof(buf), "%s/%s", dirpath, findData.cFileName);
+            buf[sizeof(buf)-1] = 0;
+
             dir_size(buf, dsize, true);
             size += dsize;
         } else {
             size += findData.nFileSizeLow + ((__int64)(findData.nFileSizeHigh) << 32);
         }
     } while (FindNextFileA(hFind, &findData));
-	::FindClose(hFind);
+
+    ::FindClose(hFind);
 #else
     char filename[MAXPATHLEN], subdir[MAXPATHLEN];
     int retval=0;
     DIRREF dirp;
     double x;
 
-    size = 0;
+    size = 0.0;
     dirp = dir_open(dirpath);
     if (!dirp) return ERR_OPENDIR;
     while (1) {
         retval = dir_scan(filename, dirp, sizeof(filename));
         if (retval) break;
-        sprintf(subdir, "%s/%s", dirpath, filename);
+
+        snprintf(subdir, sizeof(subdir), "%s/%s", dirpath, filename);
+        subdir[sizeof(subdir)-1] = 0;
 
         if (is_dir(subdir)) {
             if (recurse) {
@@ -568,7 +582,8 @@ int boinc_copy(const char* orig, const char* newf) {
     return 0;
 #elif defined(__EMX__)
     char cmd[2*MAXPATHLEN];
-    sprintf(cmd, "copy \"%s\" \"%s\"", orig, newf);
+    snprintf(cmd, sizeof(cmd), "copy \"%s\" \"%s\"", orig, newf);
+    cmd[sizeof(cmd)-1] = 0;
     return system(cmd);
 #else
     // POSIX requires that shells run from an application will use the 
@@ -626,7 +641,8 @@ int boinc_copy_attributes(const char* orig, const char* newf) {
 
 static int boinc_rename_aux(const char* old, const char* newf) {
 #ifdef _WIN32
-    if (MoveFileExA(old, newf, MOVEFILE_REPLACE_EXISTING|MOVEFILE_WRITE_THROUGH)) return 0;
+    // MOVEFILE_COPY_ALLOWED is needed if destination is on another volume (move is simulated by copy&delete)
+    if (MoveFileExA(old, newf, MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH)) return 0;
     return GetLastError();
 #else
     // rename() doesn't work between filesystems.
@@ -719,7 +735,8 @@ int boinc_make_dirs(const char* dirpath, const char* filepath) {
         p = strchr(q, '/');
         if (!p) break;
         *p = 0;
-        sprintf(newpath, "%s/%s", oldpath, q);
+        snprintf(newpath, sizeof(newpath), "%s/%s", oldpath, q);
+        newpath[sizeof(newpath)-1] = 0;
         retval = boinc_mkdir(newpath);
         if (retval) return retval;
         safe_strcpy(oldpath, newpath);
diff --git a/lib/gui_rpc_client.cpp b/lib/gui_rpc_client.cpp
index 0c159aa..f470db6 100644
--- a/lib/gui_rpc_client.cpp
+++ b/lib/gui_rpc_client.cpp
@@ -294,7 +294,7 @@ int RPC_CLIENT::authorize(const char* passwd) {
     n = snprintf(buf, sizeof(buf), "%s%s", nonce, passwd);
     if (n >= (int)sizeof(buf)) return ERR_AUTHENTICATOR;
     md5_block((const unsigned char*)buf, (int)strlen(buf), nonce_hash);
-    sprintf(buf, "<auth2>\n<nonce_hash>%s</nonce_hash>\n</auth2>\n", nonce_hash);
+    snprintf(buf, sizeof(buf), "<auth2>\n<nonce_hash>%s</nonce_hash>\n</auth2>\n", nonce_hash);
     retval = rpc.do_rpc(buf);
     if (retval) return retval;
     while (!xp.get_tag()) {
@@ -309,7 +309,9 @@ int RPC_CLIENT::authorize(const char* passwd) {
 
 int RPC_CLIENT::send_request(const char* p) {
     char buf[100000];
-    sprintf(buf,
+    snprintf(
+        buf,
+        sizeof(buf),
         "<boinc_gui_rpc_request>\n"
         "%s"
         "</boinc_gui_rpc_request>\n\003",
diff --git a/lib/gui_rpc_client.h b/lib/gui_rpc_client.h
index 69ccbc0..e42917f 100644
--- a/lib/gui_rpc_client.h
+++ b/lib/gui_rpc_client.h
@@ -564,9 +564,9 @@ struct ACCOUNT_IN {
     std::string user_name;
     std::string passwd;
     std::string team_name;
-    std::string server_hash;
+    std::string server_cookie;
     bool ldap_auth;
-    bool server_assigned_hash;
+    bool server_assigned_cookie;
 
     ACCOUNT_IN();
 
diff --git a/lib/gui_rpc_client_ops.cpp b/lib/gui_rpc_client_ops.cpp
index f9941bc..7a50ca7 100644
--- a/lib/gui_rpc_client_ops.cpp
+++ b/lib/gui_rpc_client_ops.cpp
@@ -277,7 +277,7 @@ int PROJECT::parse(XML_PARSER& xp) {
     int retval;
     char buf[256];
 
-    strcpy(buf, "");
+    safe_strcpy(buf, "");
 
     while (!xp.get_tag()) {
         if (xp.match_tag("/project")) {
@@ -462,7 +462,7 @@ void RSC_DESC::clear() {
 }
 
 void PROJECT::clear() {
-    strcpy(master_url, "");
+    safe_strcpy(master_url, "");
     resource_share = 0;
     project_name.clear();
     user_name.clear();
@@ -501,11 +501,11 @@ void PROJECT::clear() {
     last_rpc_time = 0;
     
     statistics.clear();
-    strcpy(venue, "");
+    safe_strcpy(venue, "");
     njobs_success = 0;
     njobs_error = 0;
     elapsed_time = 0;
-    strcpy(external_cpid, "");
+    safe_strcpy(external_cpid, "");
     
     flag_for_delete = false;
 }
@@ -524,8 +524,8 @@ int APP::parse(XML_PARSER& xp) {
 }
 
 void APP::clear() {
-    strcpy(name, "");
-    strcpy(user_friendly_name, "");
+    safe_strcpy(name, "");
+    safe_strcpy(user_friendly_name, "");
     project = NULL;
 }
 
@@ -606,8 +606,8 @@ int WORKUNIT::parse(XML_PARSER& xp) {
 }
 
 void WORKUNIT::clear() {
-    strcpy(name, "");
-    strcpy(app_name, "");
+    safe_strcpy(name, "");
+    safe_strcpy(app_name, "");
     version_num = 0;
     rsc_fpops_est = 0;
     rsc_fpops_bound = 0;
@@ -698,16 +698,16 @@ int RESULT::parse(XML_PARSER& xp) {
 }
 
 void RESULT::clear() {
-    strcpy(name, "");
-    strcpy(wu_name, "");
+    safe_strcpy(name, "");
+    safe_strcpy(wu_name, "");
     version_num = 0;
-    strcpy(plan_class, "");
-    strcpy(project_url, "");
-    strcpy(graphics_exec_path, "");
-    strcpy(web_graphics_url, "");
-    strcpy(remote_desktop_addr, "");
-    strcpy(slot_path, "");
-    strcpy(resources, "");
+    safe_strcpy(plan_class, "");
+    safe_strcpy(project_url, "");
+    safe_strcpy(graphics_exec_path, "");
+    safe_strcpy(web_graphics_url, "");
+    safe_strcpy(remote_desktop_addr, "");
+    safe_strcpy(slot_path, "");
+    safe_strcpy(resources, "");
     report_deadline = 0;
     received_time = 0;
     ready_to_report = false;
@@ -723,7 +723,7 @@ void RESULT::clear() {
     project_suspended_via_gui = false;
     coproc_missing = false;
     scheduler_wait = false;
-    strcpy(scheduler_wait_reason, "");
+    safe_strcpy(scheduler_wait_reason, "");
     network_wait = false;
 
     active_task = false;
@@ -1348,7 +1348,9 @@ void ACCOUNT_IN::clear() {
     user_name.clear();
     passwd.clear();
     team_name.clear();
+    server_cookie.clear();
     ldap_auth = false;
+    server_assigned_cookie = false;
 }
 
 ACCOUNT_OUT::ACCOUNT_OUT() {
@@ -1767,6 +1769,7 @@ int RPC_CLIENT::project_op(PROJECT& project, const char* op) {
     } else {
         return -1;
     }
+
     snprintf(buf, sizeof(buf),
         "<%s>\n"
         "  <project_url>%s</project_url>\n"
@@ -1776,6 +1779,7 @@ int RPC_CLIENT::project_op(PROJECT& project, const char* op) {
         tag
     );
     buf[sizeof(buf)-1] = 0;
+
     retval = rpc.do_rpc(buf);
     if (retval) return retval;
     return rpc.parse_reply();
@@ -1787,11 +1791,13 @@ int RPC_CLIENT::project_attach_from_file() {
     char buf[768];
     RPC rpc(this);
 
-    sprintf(buf,
+    snprintf(buf, sizeof(buf),
         "<project_attach>\n"
         "  <use_config_file/>\n"
         "</project_attach>\n"
     );
+    buf[sizeof(buf)-1] = 0;
+
     retval = rpc.do_rpc(buf);
     if (retval) return retval;
     return rpc.parse_reply();
@@ -1849,13 +1855,14 @@ int RPC_CLIENT::set_run_mode(int mode, double duration) {
     char buf[256];
     RPC rpc(this);
 
-    sprintf(buf, 
+    snprintf(buf, sizeof(buf), 
         "<set_run_mode>\n"
         "%s\n"
         "  <duration>%f</duration>\n"
         "</set_run_mode>\n",
         mode_name(mode), duration
     );
+    buf[sizeof(buf)-1] = 0;
 
     retval = rpc.do_rpc(buf);
     if (retval) return retval;
@@ -1868,13 +1875,14 @@ int RPC_CLIENT::set_gpu_mode(int mode, double duration) {
     char buf[256];
     RPC rpc(this);
 
-    sprintf(buf, 
+    snprintf(buf, sizeof(buf),
         "<set_gpu_mode>\n"
         "%s\n"
         "  <duration>%f</duration>\n"
         "</set_gpu_mode>\n",
         mode_name(mode), duration
     );
+    buf[sizeof(buf)-1] = 0;
 
     retval = rpc.do_rpc(buf);
     if (retval) return retval;
@@ -1887,13 +1895,15 @@ int RPC_CLIENT::set_network_mode(int mode, double duration) {
     char buf[256];
     RPC rpc(this);
 
-    sprintf(buf,
+    snprintf(buf, sizeof(buf),
         "<set_network_mode>\n"
         "%s\n"
         "  <duration>%f</duration>\n"
         "</set_network_mode>\n",
         mode_name(mode), duration
     );
+    buf[sizeof(buf)-1] = 0;
+
     retval = rpc.do_rpc(buf);
     if (retval) return retval;
     return rpc.parse_reply();
@@ -1968,6 +1978,7 @@ int RPC_CLIENT::set_proxy_settings(GR_PROXY_INFO& procinfo) {
 		procinfo.noproxy_hosts.c_str()
     );
     buf[sizeof(buf)-1] = 0;
+
     retval = rpc.do_rpc(buf);
     if (retval) return retval;
     return rpc.parse_reply();
@@ -1991,10 +2002,7 @@ int RPC_CLIENT::get_message_count(int& seqno) {
     char buf[256];
     RPC rpc(this);
 
-    sprintf(buf,
-        "<get_message_count/>\n"
-    );
-    retval = rpc.do_rpc(buf);
+    retval = rpc.do_rpc("<get_message_count/>");
     if (retval) return retval;
     while (rpc.fin.fgets(buf, 256)) {
         if (parse_int(buf, "<seqno>", seqno)) {
@@ -2010,7 +2018,7 @@ int RPC_CLIENT::get_messages(int seqno, MESSAGES& msgs, bool translatable) {
     char buf[256];
     RPC rpc(this);
 
-    sprintf(buf,
+    snprintf(buf, sizeof(buf),
         "<get_messages>\n"
         "  <seqno>%d</seqno>\n"
         "%s"
@@ -2018,6 +2026,7 @@ int RPC_CLIENT::get_messages(int seqno, MESSAGES& msgs, bool translatable) {
         seqno,
         translatable?"  <translatable/>\n":""
     );
+    buf[sizeof(buf)-1] = 0;
 
     retval = rpc.do_rpc(buf);
     if (!retval) {
@@ -2053,6 +2062,7 @@ int RPC_CLIENT::file_transfer_op(FILE_TRANSFER& ft, const char* op) {
     } else {
         return -1;
     }
+
     snprintf(buf, sizeof(buf),
         "<%s>\n"
         "   <project_url>%s</project_url>\n"
@@ -2064,6 +2074,7 @@ int RPC_CLIENT::file_transfer_op(FILE_TRANSFER& ft, const char* op) {
         tag
     );
     buf[sizeof(buf)-1] = 0;
+
     retval = rpc.do_rpc(buf);
     if (retval) return retval;
     return rpc.parse_reply();
@@ -2099,6 +2110,7 @@ int RPC_CLIENT::result_op(RESULT& result, const char* op) {
         tag
     );
     buf[sizeof(buf)-1] = 0;
+
     retval = rpc.do_rpc(buf);
     if (retval) return retval;
     return rpc.parse_reply();
@@ -2141,6 +2153,7 @@ int RPC_CLIENT::set_host_info(HOST_INFO& h) {
         h.product_name
     );
     buf[sizeof(buf)-1] = 0;
+
     int retval = rpc.do_rpc(buf);
     if (retval) return retval;
     return rpc.parse_reply();
@@ -2165,11 +2178,12 @@ int RPC_CLIENT::acct_mgr_rpc(
     RPC rpc(this);
 
     if (use_config_file) {
-        sprintf(buf,
+        snprintf(buf, sizeof(buf),
             "<acct_mgr_rpc>\n"
             "  <use_config_file/>\n"
             "</acct_mgr_rpc>\n"
         );
+        buf[sizeof(buf)-1] = 0;
     } else {
         snprintf(buf, sizeof(buf),
             "<acct_mgr_rpc>\n"
@@ -2181,6 +2195,7 @@ int RPC_CLIENT::acct_mgr_rpc(
         );
         buf[sizeof(buf)-1] = 0;
     }
+
     retval = rpc.do_rpc(buf);
     if (retval) return retval;
     return rpc.parse_reply();
@@ -2273,21 +2288,22 @@ int RPC_CLIENT::lookup_account(ACCOUNT_IN& ai) {
         downcase_string(ai.email_addr);
         passwd_hash = get_passwd_hash(ai.passwd, ai.email_addr);
     }
+
     snprintf(buf, sizeof(buf),
         "<lookup_account>\n"
         "   <url>%s</url>\n"
         "   <email_addr>%s</email_addr>\n"
         "   <passwd_hash>%s</passwd_hash>\n"
         "   <ldap_auth>%d</ldap_auth>\n"
-		"   <server_assigned_hash>%d</server_assigned_hash>\n"
-		"   <server_hash>%s</server_hash>\n"
+		"   <server_assigned_cookie>%d</server_assigned_cookie>\n"
+		"   <server_cookie>%s</server_cookie>\n"
         "</lookup_account>\n",
         ai.url.c_str(),
         ai.email_addr.c_str(),
         passwd_hash.c_str(),
         ai.ldap_auth?1:0,
-		ai.server_assigned_hash?1:0,
-	    ai.server_hash.c_str()
+		ai.server_assigned_cookie?1:0,
+	    ai.server_cookie.c_str()
     );
     buf[sizeof(buf)-1] = 0;
 
@@ -2316,6 +2332,7 @@ int RPC_CLIENT::create_account(ACCOUNT_IN& ai) {
 
     downcase_string(ai.email_addr);
     string passwd_hash = get_passwd_hash(ai.passwd, ai.email_addr);
+
     snprintf(buf, sizeof(buf),
         "<create_account>\n"
         "   <url>%s</url>\n"
@@ -2600,12 +2617,15 @@ int RPC_CLIENT::get_notices(int seqno, NOTICES& notices) {
     RPC rpc(this);
     int retval;
 
-    sprintf(buf,
+    snprintf(buf, sizeof(buf),
         "<get_notices>\n"
         "   <seqno>%d</seqno>\n"
         "</get_notices>\n",
         seqno
     );
+    buf[sizeof(buf)-1] = 0;
+
+
     retval = rpc.do_rpc(buf);
     if (retval) return retval;
     notices.received = true;
@@ -2618,12 +2638,14 @@ int RPC_CLIENT::get_notices_public(int seqno, NOTICES& notices) {
     RPC rpc(this);
     int retval;
 
-    sprintf(buf,
+    snprintf(buf, sizeof(buf),
         "<get_notices_public>\n"
         "   <seqno>%d</seqno>\n"
         "</get_notices_public>\n",
         seqno
     );
+    buf[sizeof(buf)-1] = 0;
+
     retval = rpc.do_rpc(buf);
     if (retval) return retval;
     notices.received = true;
@@ -2646,8 +2668,15 @@ int RPC_CLIENT::set_language(const char* language) {
 	int retval;
 	char buf[256];
 
-	sprintf(buf, "<set_language>\n   <language>%s</language>\n</set_language>\n", language);
-	retval = rpc.do_rpc(buf);
+	snprintf(buf, sizeof(buf),
+        "<set_language>\n"
+        "    <language>%s</language>\n"
+        "</set_language>\n",
+        language
+    );
+    buf[sizeof(buf)-1] = 0;
+
+    retval = rpc.do_rpc(buf);
 	if (retval) return retval;
 	return rpc.parse_reply();
 }
diff --git a/lib/hostinfo.cpp b/lib/hostinfo.cpp
index 4c1f7f4..5ecb729 100644
--- a/lib/hostinfo.cpp
+++ b/lib/hostinfo.cpp
@@ -35,6 +35,7 @@
 #include "md5_file.h"
 #include "parse.h"
 #include "util.h"
+#include "str_replace.h"
 
 #include "hostinfo.h"
 
@@ -44,15 +45,15 @@ HOST_INFO::HOST_INFO() {
 
 void HOST_INFO::clear_host_info() {
     timezone = 0;
-    strcpy(domain_name, "");
-    strcpy(serialnum, "");
-    strcpy(ip_addr, "");
-    strcpy(host_cpid, "");
+    safe_strcpy(domain_name, "");
+    safe_strcpy(serialnum, "");
+    safe_strcpy(ip_addr, "");
+    safe_strcpy(host_cpid, "");
 
     p_ncpus = 0;
-    strcpy(p_vendor, "");
-    strcpy(p_model, "");
-    strcpy(p_features, "");
+    safe_strcpy(p_vendor, "");
+    safe_strcpy(p_model, "");
+    safe_strcpy(p_features, "");
     p_fpops = 0;
     p_iops = 0;
     p_membw = 0;
@@ -66,12 +67,12 @@ void HOST_INFO::clear_host_info() {
     d_total = 0;
     d_free = 0;
 
-    strcpy(os_name, "");
-    strcpy(os_version, "");
-    strcpy(product_name, "");
-    strcpy(mac_address, "");
+    safe_strcpy(os_name, "");
+    safe_strcpy(os_version, "");
+    safe_strcpy(product_name, "");
+    safe_strcpy(mac_address, "");
 
-    strcpy(virtualbox_version, "");
+    safe_strcpy(virtualbox_version, "");
     num_opencl_cpu_platforms = 0;
 }
 
diff --git a/lib/md5.cpp b/lib/md5.cpp
index cc7fae2..641f988 100644
--- a/lib/md5.cpp
+++ b/lib/md5.cpp
@@ -45,45 +45,6 @@
 #include "fcgi_stdio.h"
 #endif
 
-#ifdef TEST
-/*
- * Compile with -DTEST to create a self-contained executable test program.
- * The test program should print out the same values as given in section
- * A.5 of RFC 1321, reproduced below.
- */
-#include <string.h>
-main()
-{
-    static const char *const test[7] = {
-	"", /*d41d8cd98f00b204e9800998ecf8427e*/
-	"a", /*0cc175b9c0f1b6a831c399e269772661*/
-	"abc", /*900150983cd24fb0d6963f7d28e17f72*/
-	"message digest", /*f96b697d7cb7938d525a2f31aaf161d0*/
-	"abcdefghijklmnopqrstuvwxyz", /*c3fcd3d76192e4007dfb496cca67e13b*/
-	"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
-				/*d174ab98d277d9f5a5611c2c9f419d9f*/
-	"12345678901234567890123456789012345678901234567890123456789012345678901234567890" /*57edf4a22be3c955ac49da2e2107b67a*/
-    };
-    int i;
-
-    for (i = 0; i < 7; ++i) {
-	md5_state_t state;
-	md5_byte_t digest[16];
-	int di;
-
-	md5_init(&state);
-	md5_append(&state, (const md5_byte_t *)test[i], strlen(test[i]));
-	md5_finish(&state, digest);
-	printf("MD5 (\"%s\") = ", test[i]);
-	for (di = 0; di < 16; ++di)
-	    printf("%02x", digest[di]);
-	printf("\n");
-    }
-    return 0;
-}
-#endif /* TEST */
-
-
 /*
  * For reference, here is the program that computed the T values.
  */
@@ -99,6 +60,7 @@ main()
     return 0;
 }
 #endif
+
 /*
  * End of T computation program.
  */
diff --git a/lib/md5_file.cpp b/lib/md5_file.cpp
index dfa5d0b..6d7a6a5 100644
--- a/lib/md5_file.cpp
+++ b/lib/md5_file.cpp
@@ -32,6 +32,10 @@
 #include <wincrypt.h>
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #ifdef ANDROID
 #include <stdlib.h>
 #endif
diff --git a/lib/mfile.cpp b/lib/mfile.cpp
index 31a40cb..1290fcc 100644
--- a/lib/mfile.cpp
+++ b/lib/mfile.cpp
@@ -31,6 +31,7 @@
 #endif
 
 #include "error_numbers.h"
+#include "str_replace.h"
 #include "filesys.h"
 
 #include "mfile.h"
diff --git a/lib/miofile.cpp b/lib/miofile.cpp
index 175ccdd..f1116f4 100644
--- a/lib/miofile.cpp
+++ b/lib/miofile.cpp
@@ -27,6 +27,7 @@
 #endif
 
 #include "error_numbers.h"
+#include "str_replace.h"
 
 #include "miofile.h"
 
@@ -132,14 +133,14 @@ int copy_element_contents(MIOFILE& in, const char* end_tag, char* p, int len) {
     char buf[256];
     int n;
 
-    strcpy(p, "");
+    strlcpy(p, "", len);
     while (in.fgets(buf, 256)) {
         if (strstr(buf, end_tag)) {
             return 0;
         }
         n = (int)strlen(buf);
         if (n >= len-1) return ERR_XML_PARSE;
-        strcat(p, buf);
+        strlcat(p, buf, len);
         len -= n;
     }
     return ERR_XML_PARSE;
diff --git a/lib/msg_log.cpp b/lib/msg_log.cpp
index f23a599..f390183 100644
--- a/lib/msg_log.cpp
+++ b/lib/msg_log.cpp
@@ -28,6 +28,7 @@
 #endif
 
 #include "str_util.h"
+#include "str_replace.h"
 #include "util.h"
 
 #include "msg_log.h"
@@ -68,7 +69,7 @@ MSG_LOG::MSG_LOG(FILE* output_) {
     indent_level = 0;
     spaces[0] = 0;
     pid = 0;
-    strcpy(spaces+1, "                                                                              ");
+    safe_strcpy(spaces+1, "                                                                              ");
 }
 
 void MSG_LOG::enter_level(int diff) {
diff --git a/lib/network.cpp b/lib/network.cpp
index da11317..ef26a85 100644
--- a/lib/network.cpp
+++ b/lib/network.cpp
@@ -18,7 +18,6 @@
 #if   defined(_WIN32) && !defined(__STDWX_H__)
 #include "boinc_win.h"
 #include <fcntl.h>
-
 #elif defined(_WIN32) && defined(__STDWX_H__)
 #include "stdwx.h"
 #else
@@ -38,6 +37,10 @@
 #include <errno.h>
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #include "error_numbers.h"
 #include "str_util.h"
 #include "util.h"
@@ -73,7 +76,7 @@ const char* socket_error_str() {
     case WSAENOTSOCK:
         return "not a socket";
     }
-    sprintf(buf, "error %d", e);
+    snprintf(buf, sizeof(buf), "error %d", e);
     return buf;
 #else
     switch (h_errno) {
@@ -87,11 +90,11 @@ const char* socket_error_str() {
         return "host not found or server failure";
 #ifdef NETDB_INTERNAL
     case NETDB_INTERNAL:
-        sprintf(buf,"network internal error %d",errno);
+        snprintf(buf, sizeof(buf), "network internal error %d", errno);
         return buf;
 #endif
     }
-    sprintf(buf, "error %d", h_errno);
+    snprintf(buf, sizeof(buf), "error %d", h_errno);
     return buf;
 #endif
 }
@@ -166,7 +169,7 @@ int resolve_hostname(const char* hostname, sockaddr_storage &ip_addr) {
     int retval = getaddrinfo(hostname, NULL, &hints, &res);
     if (retval) {
         char buf[256];
-        sprintf(buf, "%s: getaddrinfo", time_to_string(dtime()));
+        snprintf(buf, sizeof(buf), "%s: getaddrinfo", time_to_string(dtime()));
         perror(buf);
         return ERR_GETADDRINFO;
     }
@@ -220,8 +223,8 @@ int boinc_socket(int& fd, int protocol) {
     fd = (int)socket(protocol, SOCK_STREAM, 0);
     if (fd < 0) {
         char buf[256];
-        sprintf(buf, "%s: socket", time_to_string(dtime()));
-        perror("buf");
+        snprintf(buf, sizeof(buf), "%s: socket", time_to_string(dtime()));
+        perror(buf);
         return ERR_SOCKET;
     }
 #ifndef _WIN32
diff --git a/lib/notice.cpp b/lib/notice.cpp
index 2182a87..aa750f9 100644
--- a/lib/notice.cpp
+++ b/lib/notice.cpp
@@ -100,17 +100,17 @@ void NOTICE::write(MIOFILE& f, bool for_gui) {
 
 void NOTICE::clear() {
     seqno = 0;
-    strcpy(title, "");
+    safe_strcpy(title, "");
     description = "";
     create_time = 0;
     arrival_time = 0;
     is_private = false;
     is_youtube_video = false;
-    strcpy(category, "");
-    strcpy(link, "");
-    strcpy(project_name, "");
-    strcpy(guid, "");
-    strcpy(feed_url, "");
+    safe_strcpy(category, "");
+    safe_strcpy(link, "");
+    safe_strcpy(project_name, "");
+    safe_strcpy(guid, "");
+    safe_strcpy(feed_url, "");
     keep = false;
 }
 
diff --git a/lib/parse.cpp b/lib/parse.cpp
index f059f48..a866979 100644
--- a/lib/parse.cpp
+++ b/lib/parse.cpp
@@ -40,6 +40,10 @@
 #endif
 
 #ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
+#if !defined(HAVE_STRDUP) && defined(HAVE__STRDUP)
 #define strdup _strdup
 #endif
 
@@ -68,13 +72,13 @@ bool parse_bool(const char* buf, const char* tag, bool& result) {
     if (!strstr(buf, tag)) {
         return false;
     }
-    sprintf(tag2, "<%s/>", tag);
-    sprintf(tag3, "<%s />", tag);
+    snprintf(tag2, sizeof(tag2), "<%s/>", tag);
+    snprintf(tag3, sizeof(tag3), "<%s />", tag);
     if (match_tag(buf, tag2) || match_tag(buf, tag3)) {
         result = true;
         return true;
     }
-    sprintf(tag2, "<%s>", tag);
+    snprintf(tag2, sizeof(tag2), "<%s>", tag);
     if (parse_int(buf, tag2, x)) {
         result = (x != 0);
         return true;
@@ -198,13 +202,13 @@ int dup_element(FILE* in, const char* tag_name, char** pp) {
     char buf[256], end_tag[256];
     int retval;
 
-    sprintf(buf, "<%s>\n", tag_name);
-    sprintf(end_tag, "</%s>", tag_name);
+    snprintf(buf, sizeof(buf), "<%s>\n", tag_name);
+    snprintf(end_tag, sizeof(end_tag), "</%s>", tag_name);
 
     char* p = strdup(buf);
     while (fgets(buf, 256, in)) {
         if (strstr(buf, end_tag)) {
-            sprintf(buf, "</%s>\n", tag_name);
+            snprintf(buf, sizeof(buf), "</%s>\n", tag_name);
             retval = strcatdup(p, buf);
             if (retval) return retval;
             *pp = p;
@@ -314,7 +318,7 @@ void extract_venue(const char* in, const char* venue_name, char* out, int len) {
     const char* p, *q;
     char* wp;
     char buf[256];
-    sprintf(buf, "<venue name=\"%s\">", venue_name);
+    snprintf(buf, sizeof(buf), "<venue name=\"%s\">", venue_name);
     p = strstr(in, buf);
     if (p) {
         // prefs contain the specified venue
@@ -366,7 +370,7 @@ void non_ascii_escape(const char* in, char* out, int len) {
         int x = (int) *in;
         x &= 0xff;   // just in case
         if (x>127) {
-            sprintf(buf, "&#%d;", x);
+            snprintf(buf, sizeof(buf), "&#%d;", x);
             strcpy(p, buf);
             p += strlen(buf);
         } else {
@@ -397,7 +401,7 @@ void xml_escape(const char* in, char* out, int len) {
             strcpy(p, "&");
             p += 5;
         } else if (x>127) {
-            sprintf(buf, "&#%d;", x);
+            snprintf(buf, sizeof(buf), "&#%d;", x);
             strcpy(p, buf);
             p += strlen(buf);
         } else if (x<32) {
@@ -405,7 +409,7 @@ void xml_escape(const char* in, char* out, int len) {
             case 9:
             case 10:
             case 13:
-                sprintf(buf, "&#%d;", x);
+                snprintf(buf, sizeof(buf), "&#%d;", x);
                 strcpy(p, buf);
                 p += strlen(buf);
                 break;
@@ -665,6 +669,41 @@ bool XML_PARSER::parse_int(const char* start_tag, int& i) {
     return true;
 }
 
+// Same, for long
+//
+bool XML_PARSER::parse_long(const char* start_tag, long& i) {
+    char buf[256], *end;
+    bool eof;
+    char end_tag[TAG_BUF_LEN], tag[TAG_BUF_LEN];
+
+    if (strcmp(parsed_tag, start_tag)) return false;
+
+    end_tag[0] = '/';
+    strcpy(end_tag+1, start_tag);
+
+    eof = get(buf, sizeof(buf), is_tag);
+    if (eof) return false;
+    if (is_tag) {
+        if (!strcmp(buf, end_tag)) {
+            i = 0;      // treat <foo></foo> as <foo>0</foo>
+            return true;
+        } else {
+            return false;
+        }
+    }
+    errno = 0;
+    long val = strtol(buf, &end, 0);
+    if (errno) return false;
+    if (end != buf+strlen(buf)) return false;
+
+    eof = get(tag, sizeof(tag), is_tag);
+    if (eof) return false;
+    if (!is_tag) return false;
+    if (strcmp(tag, end_tag)) return false;
+    i = val;
+    return true;
+}
+
 // Same, for doubles
 //
 bool XML_PARSER::parse_double(const char* start_tag, double& x) {
@@ -844,7 +883,7 @@ void XML_PARSER::skip_unexpected(
         );
     }
     if (strchr(start_tag, '/')) return;
-    sprintf(end_tag, "/%s", start_tag);
+    snprintf(end_tag, sizeof(end_tag), "/%s", start_tag);
 
     while (1) {
         int c;
@@ -878,7 +917,7 @@ int XML_PARSER::copy_element(string& out) {
     out = "<";
     out += parsed_tag;
     out += ">";
-    sprintf(end_tag, "</%s>", parsed_tag);
+    snprintf(end_tag, sizeof(end_tag), "</%s>", parsed_tag);
     int retval = element_contents(end_tag, buf, sizeof(buf));
     if (retval) return retval;
     out += buf;
diff --git a/lib/parse.h b/lib/parse.h
index 618d4c1..bc0d4af 100644
--- a/lib/parse.h
+++ b/lib/parse.h
@@ -252,6 +252,7 @@ struct XML_PARSER {
     bool parse_str(const char*, char*, int);
     bool parse_string(const char*, std::string&);
     bool parse_int(const char*, int&);
+    bool parse_long(const char*, long&);
     bool parse_double(const char*, double&);
     bool parse_ulong(const char*, unsigned long&);
     bool parse_ulonglong(const char*, unsigned long long&);
diff --git a/lib/prefs.cpp b/lib/prefs.cpp
index 3a8267e..2efda1a 100644
--- a/lib/prefs.cpp
+++ b/lib/prefs.cpp
@@ -32,6 +32,7 @@
 #endif
 
 #include "error_numbers.h"
+#include "str_replace.h"
 #include "parse.h"
 #include "util.h"
 
@@ -302,8 +303,8 @@ void GLOBAL_PREFS::init_bools() {
 
 void GLOBAL_PREFS::init() {
     defaults();
-    strcpy(source_project, "");
-    strcpy(source_scheduler, "");
+    safe_strcpy(source_project, "");
+    safe_strcpy(source_scheduler, "");
     mod_time = 0;
     host_specific = false;
 }
diff --git a/lib/project_init.cpp b/lib/project_init.cpp
index 87fca38..187c96f 100644
--- a/lib/project_init.cpp
+++ b/lib/project_init.cpp
@@ -32,15 +32,16 @@
 #include "filesys.h"
 #include "url.h"
 #include "parse.h"
+#include "str_replace.h"
 
 #include "project_init.h"
 
 void PROJECT_INIT::clear() {
-    strcpy(url, "");
-    strcpy(name, "");
-    strcpy(account_key, "");
-    strcpy(team_name, "");
-    strcpy(setup_cookie, "");
+    safe_strcpy(url, "");
+    safe_strcpy(name, "");
+    safe_strcpy(account_key, "");
+    safe_strcpy(team_name, "");
+    safe_strcpy(setup_cookie, "");
     embedded = false;
 }
 
diff --git a/lib/proxy_info.cpp b/lib/proxy_info.cpp
index 1b800bd..814dd43 100644
--- a/lib/proxy_info.cpp
+++ b/lib/proxy_info.cpp
@@ -17,6 +17,7 @@
 
 #include "error_numbers.h"
 #include "parse.h"
+#include "str_replace.h"
 
 #include "proxy_info.h"
 
@@ -109,16 +110,16 @@ void PROXY_INFO::clear() {
     use_socks_proxy = false;
     use_http_auth = false;
     autodetect_proxy_supported = false;
-    strcpy(socks_server_name, "");
-    strcpy(http_server_name, "");
+    safe_strcpy(socks_server_name, "");
+    safe_strcpy(http_server_name, "");
     socks_server_port = 80;
     http_server_port = 80;
-    strcpy(socks5_user_name, "");
-    strcpy(socks5_user_passwd, "");
-    strcpy(http_user_name, "");
-    strcpy(http_user_passwd, "");
-    strcpy(noproxy_hosts, "");
-    strcpy(autodetect_server_name, "");
+    safe_strcpy(socks5_user_name, "");
+    safe_strcpy(socks5_user_passwd, "");
+    safe_strcpy(http_user_name, "");
+    safe_strcpy(http_user_passwd, "");
+    safe_strcpy(noproxy_hosts, "");
+    safe_strcpy(autodetect_server_name, "");
     autodetect_proxy_supported = false;
     need_autodetect_proxy_settings = false;
     have_autodetect_proxy_settings = false;
diff --git a/lib/run_app_windows.cpp b/lib/run_app_windows.cpp
index 0e4541f..28792cd 100644
--- a/lib/run_app_windows.cpp
+++ b/lib/run_app_windows.cpp
@@ -27,6 +27,7 @@
 #include "win_util.h"
 #include "filesys.h"
 #include "error_numbers.h"
+#include "str_replace.h"
 #include "common_defs.h"
 #include "util.h"
 #include "parse.h"
@@ -552,11 +553,11 @@ int run_app_windows(
     memset(&startup_info, 0, sizeof(startup_info));
     startup_info.cb = sizeof(startup_info);
 
-    strcpy(cmdline, "");
+    safe_strcpy(cmdline, "");
     for (int i=0; i<argc; i++) {
-        strcat(cmdline, argv[i]);
+        safe_strcat(cmdline, argv[i]);
         if (i<argc-1) {
-            strcat(cmdline, " ");
+            safe_strcat(cmdline, " ");
         }
     }
 
diff --git a/lib/shmem.cpp b/lib/shmem.cpp
index 00b3cb7..ea88e88 100644
--- a/lib/shmem.cpp
+++ b/lib/shmem.cpp
@@ -23,6 +23,10 @@
 #include "stdwx.h"
 #endif
 
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#endif
+
 #ifdef __EMX__
 #define INCL_DOS
 #define INCL_DOSERRORS
@@ -138,9 +142,7 @@ HANDLE create_shmem(LPCTSTR seg_name, int size, void** pp, bool try_global) {
         } 
      
         if (!InitializeSecurityDescriptor(pSD, SECURITY_DESCRIPTOR_REVISION)) {
-            fprintf(stderr, "InitializeSecurityDescriptor Error %u\n",
-                GetLastError()
-            );
+            fprintf(stderr, "InitializeSecurityDescriptor Error %u\n", GetLastError());
             goto Cleanup; 
         } 
      
@@ -170,7 +172,7 @@ HANDLE create_shmem(LPCTSTR seg_name, int size, void** pp, bool try_global) {
         // terminal server session boundaries.
         //
         if (try_global) {
-            sprintf(global_seg_name, "Global\\%s", seg_name);
+            snprintf(global_seg_name, sizeof(global_seg_name), "Global\\%s", seg_name);
             hMap = CreateFileMapping(
                 INVALID_HANDLE_VALUE, &sa, PAGE_READWRITE, 0,
                 size, global_seg_name
@@ -220,7 +222,7 @@ HANDLE attach_shmem(LPCTSTR seg_name, void** pp) {
     // name if the shared memory segment is going to cross
     // terminal server session boundries.
     //
-    sprintf(global_seg_name, "Global\\%s", seg_name);
+    snprintf(global_seg_name, sizeof(global_seg_name), "Global\\%s", seg_name);
 
     // Try using 'Global' so that it can cross terminal server sessions
     //
@@ -251,7 +253,7 @@ int create_shmem(key_t key, int size, void** pp) {
     APIRET rc;
     char   buf[256];
 
-    sprintf(buf, "\\SHAREMEM\\BOINC\\%d", key);
+    snprintf(buf, sizeof(buf), "\\SHAREMEM\\BOINC\\%d", key);
     //debug_printf( "create_shmem %s, %d, %p\n", buf, size, pp);
     rc = DosAllocSharedMem(pp, (PSZ)buf, size, PAG_READ | PAG_WRITE | PAG_EXECUTE | PAG_COMMIT | OBJ_ANY);
     if (rc == ERROR_ALREADY_EXISTS)
@@ -287,7 +289,7 @@ int attach_shmem(key_t key, void** pp){
     APIRET rc;
     char   buf[256];
 
-    sprintf(buf, "\\SHAREMEM\\BOINC\\%d", key);
+    snprintf(buf, sizeof(buf), "\\SHAREMEM\\BOINC\\%d", key);
     //debug_printf( "attach_shmem %s, %p\n", buf, pp);
     rc = DosGetNamedSharedMem(pp, (PSZ) buf, PAG_READ | PAG_WRITE);
     if (rc) {
diff --git a/lib/stackwalker_win.cpp b/lib/stackwalker_win.cpp
index e01c5bc..25f1fdc 100644
--- a/lib/stackwalker_win.cpp
+++ b/lib/stackwalker_win.cpp
@@ -53,6 +53,7 @@
 #endif
 
 #include "diagnostics.h"
+#include "str_replace.h"
 #include "stackwalker_win.h"
 #include "stackwalker_imports.h"
 
@@ -242,25 +243,25 @@ BOOL CALLBACK SymEnumerateModulesProc64(LPCSTR /* ModuleName */, DWORD64 BaseOfD
         switch ( Module.SymType )
         {
             case SymNone:
-                strcpy( szSymbolType, "-nosymbols-" );
+                safe_strcpy( szSymbolType, "-nosymbols-" );
                 break;
             case SymCoff:
-                strcpy( szSymbolType, "COFF" );
+                safe_strcpy( szSymbolType, "COFF" );
                 break;
             case SymCv:
-                strcpy( szSymbolType, "CV" );
+                safe_strcpy( szSymbolType, "CV" );
                 break;
             case SymPdb:
-                strcpy( szSymbolType, "PDB" );
+                safe_strcpy( szSymbolType, "PDB" );
                 break;
             case SymExport:
-                strcpy( szSymbolType, "-exported-" );
+                safe_strcpy( szSymbolType, "-exported-" );
                 break;
             case SymDeferred:
-                strcpy( szSymbolType, "-deferred-" );
+                safe_strcpy( szSymbolType, "-deferred-" );
                 break;
             case SymSym:
-                strcpy( szSymbolType, "SYM" );
+                safe_strcpy( szSymbolType, "SYM" );
                 break;
             default:
                 snprintf( szSymbolType, sizeof(szSymbolType), "symtype=%ld", (long) Module.SymType );
@@ -280,7 +281,7 @@ BOOL CALLBACK SymEnumerateModulesProc64(LPCSTR /* ModuleName */, DWORD64 BaseOfD
                 bFileVersionRetrieved = true;
 
                 // Which language should be used to lookup the structure?
-                strcpy(szQuery, "\\VarFileInfo\\Translation");
+                safe_strcpy(szQuery, "\\VarFileInfo\\Translation");
                 pVQV(lpData, szQuery, (LPVOID*)&lpTranslate, &uiVarSize);
 
 
@@ -794,9 +795,9 @@ static void ShowStackRM(HANDLE hThread, CONTEXT& Context)
     memset( &Module, '\0', sizeof(IMAGEHLP_MODULE64) );
     Module.SizeOfStruct = sizeof(IMAGEHLP_MODULE64);
   
-    strcpy(szMsgSymFromAddr, "");
-    strcpy(szMsgSymGetLineFromAddr, "");
-    strcpy(szMsgSymGetModuleInfo, "");
+    safe_strcpy(szMsgSymFromAddr, "");
+    safe_strcpy(szMsgSymGetLineFromAddr, "");
+    safe_strcpy(szMsgSymGetModuleInfo, "");
 
 
     for ( frameNum = 0; ; ++frameNum )
diff --git a/lib/str_util.cpp b/lib/str_util.cpp
index 7d92efd..8e00441 100644
--- a/lib/str_util.cpp
+++ b/lib/str_util.cpp
@@ -143,7 +143,7 @@ int ndays_to_string (double x, int smallest_timescale, char *buf) {
     } else if (years > 1 && smallest_timescale < 4) {
         sprintf( year_buf, "%d yr ", (int)years );
     } else {
-        strcpy( year_buf, "" );
+        safe_strcpy( year_buf, "" );
     }
 
     if (smallest_timescale==3) {
@@ -151,7 +151,7 @@ int ndays_to_string (double x, int smallest_timescale, char *buf) {
     } else if (days > 1 && smallest_timescale < 3) {
         sprintf( day_buf, "%d day%s ", (int)days, (days>1?"s":"") );
     } else {
-        strcpy( day_buf, "" );
+        safe_strcpy( day_buf, "" );
     }
 
     if (smallest_timescale==2) {
@@ -159,7 +159,7 @@ int ndays_to_string (double x, int smallest_timescale, char *buf) {
     } else if (hours > 1 && smallest_timescale < 2) {
         sprintf( hour_buf, "%d hr ", (int)hours );
     } else {
-        strcpy( hour_buf, "" );
+        safe_strcpy( hour_buf, "" );
     }
 
     if (smallest_timescale==1) {
@@ -167,7 +167,7 @@ int ndays_to_string (double x, int smallest_timescale, char *buf) {
     } else if (minutes > 1 && smallest_timescale < 1) {
         sprintf( min_buf, "%d min ", (int)minutes );
     } else {
-        strcpy( min_buf, "" );
+        safe_strcpy( min_buf, "" );
     }
 
     if (smallest_timescale==0) {
@@ -175,7 +175,7 @@ int ndays_to_string (double x, int smallest_timescale, char *buf) {
     } else if (seconds > 1 && smallest_timescale < 0) {
         sprintf( sec_buf, "%d sec ", (int)seconds );
     } else {
-        strcpy( sec_buf, "" );
+        safe_strcpy( sec_buf, "" );
     }
     // the "-0.05" below is to prevent it from printing 60.0 sec
     // when the real value is e.g. 59.91
@@ -335,7 +335,7 @@ void strip_whitespace(string& str) {
 char* time_to_string(double t) {
     static char buf[100];
     if (!t) {
-        strcpy(buf, "---");
+        safe_strcpy(buf, "---");
     } else {
         time_t x = (time_t)t;
         struct tm* tm = localtime(&x);
@@ -359,7 +359,7 @@ char* precision_time_to_string(double t) {
 
     strftime(buf, sizeof(buf)-1, "%Y-%m-%d %H:%M:%S", tm);
     sprintf(finer, ".%04d", hundreds_of_microseconds);
-    strcat(buf, finer);
+    safe_strcat(buf, finer);
     return buf;
 }
 
@@ -695,7 +695,7 @@ int string_substitute(
             break;
         }
         if (!strncmp(&haystack[i], needle, needle_len)){
-            strcpy(out+j, target);
+            strlcpy(out+j, target, out_len-((out+j)-out));
             i += needle_len;
             j += target_len;
         } else {
diff --git a/lib/url.cpp b/lib/url.cpp
index a1a2e35..d6db724 100644
--- a/lib/url.cpp
+++ b/lib/url.cpp
@@ -65,8 +65,8 @@ void parse_url(const char* url, PARSED_URL& purl) {
 
     // parse user name and password
     //
-    strcpy(purl.user, "");
-    strcpy(purl.passwd, "");
+    safe_strcpy(purl.user, "");
+    safe_strcpy(purl.passwd, "");
     p = strchr(buf, '@');
     if (p) {
         *p = 0;
@@ -162,6 +162,7 @@ void unescape_url(string& url) {
 }
 
 void escape_url(const char *in, char*out, int out_size) {
+    char buf[256];
     int x, y;
     for (x=0, y=0; in[x] && (y<out_size-3); ++x) {
         if (isalnum(in[x])) {
@@ -171,10 +172,9 @@ void escape_url(const char *in, char*out, int out_size) {
             out[y] = '%';
             ++y;
             out[y] = 0;
-            char buf[256];
-            sprintf(buf, "%d", (char)in[x]);
+            snprintf(buf, sizeof(buf), "%d", (char)in[x]);
             c2x(buf);
-            strcat(out, buf);
+            strlcat(out, buf, out_size);
             y += 2;
         }
     }
@@ -238,7 +238,7 @@ void canonicalize_master_url(char* url, int len) {
     }
     n = strlen(buf);
     if (buf[n-1] != '/' && (n<sizeof(buf)-2)) {
-        strcat(buf, "/");
+        safe_strcat(buf, "/");
     }
     snprintf(url, len, "http%s://%s", (bSSL ? "s" : ""), buf);
     url[len-1] = 0;
diff --git a/lib/util.cpp b/lib/util.cpp
index 3f65303..2a7c797 100644
--- a/lib/util.cpp
+++ b/lib/util.cpp
@@ -25,7 +25,8 @@
 #endif
 
 #if defined(_MSC_VER) || defined(__MINGW32__)
-#define finite _finite
+#define finite   _finite
+#define snprintf _snprintf
 #endif
 
 #ifndef M_LN2
@@ -297,7 +298,7 @@ double linux_cpu_time(int pid) {
     unsigned long utime = 0, stime = 0;
     int n;
 
-    sprintf(file_name,"/proc/%d/stat",pid);
+    snprintf(file_name, sizeof(file_name), "/proc/%d/stat", pid);
     if ((file = fopen(file_name,"r")) != NULL) {
         n = fscanf(file,"%*s%*s%*s%*s%*s%*s%*s%*s%*s%*s%*s%*s%*s%lu%lu",&utime,&stime);
         fclose(file);
@@ -415,11 +416,11 @@ int run_program(
     memset(&startup_info, 0, sizeof(startup_info));
     startup_info.cb = sizeof(startup_info);
 
-    strcpy(cmdline, "");
+    safe_strcpy(cmdline, "");
     for (int i=0; i<argc; i++) {
-        strcat(cmdline, argv[i]);
+        safe_strcat(cmdline, argv[i]);
         if (i<argc-1) {
-            strcat(cmdline, " ");
+            safe_strcat(cmdline, " ");
         }
     }
 
@@ -552,8 +553,8 @@ static int get_client_mutex(const char*) {
     
     // Global mutex on Win2k and later
     //
-    strcpy(buf, "Global\\");
-    strcat(buf, RUN_MUTEX);
+    safe_strcpy(buf, "Global\\");
+    safe_strcat(buf, RUN_MUTEX);
 
     HANDLE h = CreateMutexA(NULL, true, buf);
     if ((h==0) || (GetLastError() == ERROR_ALREADY_EXISTS)) {
@@ -564,7 +565,9 @@ static int get_client_mutex(const char* dir) {
     char path[MAXPATHLEN];
     static FILE_LOCK file_lock;
 
-    sprintf(path, "%s/%s", dir, LOCK_FILE_NAME);
+    snprintf(path, sizeof(path), "%s/%s", dir, LOCK_FILE_NAME);
+    path[sizeof(path)-1] = 0;
+
     int retval = file_lock.lock(path);
     if (retval == ERR_FCNTL) {
         return ERR_ALREADY_RUNNING;
diff --git a/lib/win_util.cpp b/lib/win_util.cpp
index 057a87b..3db88e9 100644
--- a/lib/win_util.cpp
+++ b/lib/win_util.cpp
@@ -29,6 +29,7 @@
 #include "util.h"
 #include "filesys.h"
 #include "win_util.h"
+#include "str_replace.h"
 
 
 /**
@@ -111,7 +112,7 @@ void chdir_to_data_dir() {
         }
     } else {
         if (SUCCEEDED(SHGetFolderPathA(NULL, CSIDL_COMMON_APPDATA|CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_CURRENT, szPath))) {
-            strncat(szPath, "\\boinc", (sizeof(szPath) - strlen(szPath)));
+            safe_strcat(szPath, "\\boinc");
             if (boinc_file_exists(szPath)) {
                 SetCurrentDirectoryA(szPath);
             }
@@ -166,7 +167,7 @@ char* windows_format_error_string(
             LocalFree((HLOCAL)lpszTemp);
         }
     } else {
-        strcpy(pszBuf, "(unknown error)");
+        strlcpy(pszBuf, "(unknown error)", iSize);
     }
 
     return pszBuf;
diff --git a/locale/fr/BOINC-Drupal.po b/locale/fr/BOINC-Drupal.po
index e03d39c..0129c03 100644
--- a/locale/fr/BOINC-Drupal.po
+++ b/locale/fr/BOINC-Drupal.po
@@ -14,7 +14,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: BOINC\n"
 "POT-Creation-Date: 2015-12-15 12:43+0000\n"
-"PO-Revision-Date: 2016-01-22 21:15+0000\n"
+"PO-Revision-Date: 2016-02-18 13:16+0000\n"
 "Last-Translator: Philippe Janocha\n"
 "Language-Team: French (http://www.transifex.com/boinc/boinc/language/fr/)\n"
 "MIME-Version: 1.0\n"
@@ -1759,7 +1759,7 @@ msgstr "Si vous avez exécuté BOINC avec ce compte, vous pouvez toujours y avoi
 msgid ""
 "Go to the BOINC data directory on your computer (on Windows this is usually "
 "%path1 or %path2."
-msgstr "Aller dans le répertoire de données de BOINC de votre ordinateur (sous Windows c'est généralement %path_1 ou %path_2."
+msgstr "Aller dans le répertoire des données de BOINC de votre ordinateur (sous Windows, c'est généralement %path_1 ou %path_2)."
 
 msgid ""
 "Find your account file for this project; it will have a name like %file "
@@ -1792,7 +1792,7 @@ msgstr "Il n'y a pas de compte avec cet authentificateur."
 msgid ""
 "Go to the <a href=\"%wikiref\">BOINC data directory</a> on your computer (on"
 " Windows this is usually %path1 or %path2."
-msgstr "Aller dans le répertoire de données <a href=\"%wikiref\"> de BOINC de votre ordinateur (sous Windows c'est généralement %path1 ou %path2."
+msgstr "Aller dans le répertoire des données <a href=\"%wikiref\"> de BOINC de votre ordinateur (sous Windows, c'est généralement %path1 ou %path2)."
 
 msgid "BOINC documentation"
 msgstr "Documentation de BOINC"
diff --git a/locale/fr/BOINC-Manager.po b/locale/fr/BOINC-Manager.po
index a36b711..148f73c 100644
--- a/locale/fr/BOINC-Manager.po
+++ b/locale/fr/BOINC-Manager.po
@@ -18,7 +18,7 @@ msgstr ""
 "Project-Id-Version: BOINC\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2015-10-16 17:27-0500\n"
-"PO-Revision-Date: 2016-01-21 19:31+0000\n"
+"PO-Revision-Date: 2016-02-11 16:49+0000\n"
 "Last-Translator: Philippe Janocha\n"
 "Language-Team: French (http://www.transifex.com/boinc/boinc/language/fr/)\n"
 "MIME-Version: 1.0\n"
diff --git a/locale/fr/BOINC-Project-Generic.po b/locale/fr/BOINC-Project-Generic.po
index 420d46b..1c6f006 100644
--- a/locale/fr/BOINC-Project-Generic.po
+++ b/locale/fr/BOINC-Project-Generic.po
@@ -9,14 +9,15 @@
 # Axel Coutemanche <brulavoineaxel at gmail.com>, 2016
 # Jerome Cadet <jerome.cadet at pobox.com>, 2015
 # Jun Seo <seo.galileo at gmail.com>, 2015
+# Philippe Janocha, 2016
 # PINSET Romaric <inactive+RomaricP at transifex.com>, 2015
 msgid ""
 msgstr ""
 "Project-Id-Version: BOINC\n"
 "Report-Msgid-Bugs-To: BOINC translation team <boinc_loc at boinc.berkeley.edu>\n"
 "POT-Creation-Date: 2015-06-24 13:05 PDT\n"
-"PO-Revision-Date: 2016-01-21 18:46+0000\n"
-"Last-Translator: Axel Coutemanche <brulavoineaxel at gmail.com>\n"
+"PO-Revision-Date: 2016-02-14 18:17+0000\n"
+"Last-Translator: Philippe Janocha\n"
 "Language-Team: French (http://www.transifex.com/boinc/boinc/language/fr/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -783,7 +784,7 @@ msgstr "Vitesse mesurée pour les calculs en virgule flottante"
 
 #: ../inc/host.inc:149 ../inc/host.inc:152
 msgid "%1 million ops/sec"
-msgstr "%1 million d'opérations/sec"
+msgstr "%1 million(s) d'opérations/s"
 
 #: ../inc/host.inc:152
 msgid "Measured integer speed"
diff --git a/locale/fr/BOINC-Setup.po b/locale/fr/BOINC-Setup.po
index 834b09b..9c338f6 100644
--- a/locale/fr/BOINC-Setup.po
+++ b/locale/fr/BOINC-Setup.po
@@ -3,14 +3,15 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
+# Philippe Janocha, 2016
 msgid ""
 msgstr ""
 "Project-Id-Version: BOINC\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2014-01-26 00:00-0800\n"
-"PO-Revision-Date: 2015-04-20 12:34+0000\n"
-"Last-Translator: Rom Walton\n"
-"Language-Team: French (http://www.transifex.com/projects/p/boinc/language/fr/)\n"
+"PO-Revision-Date: 2016-02-11 16:24+0000\n"
+"Last-Translator: Philippe Janocha\n"
+"Language-Team: French (http://www.transifex.com/boinc/boinc/language/fr/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -20,7 +21,7 @@ msgstr ""
 #: Installer.cpp:124
 #, c-format
 msgid "Sorry, this version of %s requires system 10.5 or higher."
-msgstr "Veuillez nous excuser, cette version de %s requiert un système 10.5 ou supérieur."
+msgstr "Désolé, cette version de %s requiert un système 10.5 ou supérieur."
 
 #: PostInstall.cpp:130 PostInstall.cpp:1136 uninstall.cpp:1618
 msgid "Yes"
@@ -32,7 +33,7 @@ msgstr "Non"
 
 #: PostInstall.cpp:133
 msgid "Should BOINC run even when no user is logged in?"
-msgstr "BOINC doit-il fonctionner même lorsqu'aucun utilisateur n'est connecté?"
+msgstr "BOINC doit-il fonctionner même lorsqu'aucun utilisateur n'est connecté ?"
 
 #: PostInstall.cpp:1416
 #, c-format
@@ -45,7 +46,7 @@ msgstr "Les utilisateurs ayant les privilèges administrateurs sur cet ordinateu
 #: PostInstall.cpp:1444
 #, c-format
 msgid "Do you want to set %s as the screensaver for all %s users on this Mac?"
-msgstr "Voulez-vous établir %s comme économiseur d'écran pour tous les utilisateurs %s sur ce Mac ?"
+msgstr "Voulez-vous établir %s comme économiseur d'écran pour tous les utilisateurs de %s sur ce Mac ?"
 
 #: uninstall.cpp:82
 msgid "OK"
@@ -77,7 +78,7 @@ msgstr "Annulé : %s n'a pas été modifié ."
 #: uninstall.cpp:174
 #, c-format
 msgid "An error occurred: error code %d"
-msgstr "Une erreur est survenue: code d'erreur %d"
+msgstr "Une erreur est survenue : code d'erreur %d"
 
 #: uninstall.cpp:230
 msgid "name  of user"
@@ -99,14 +100,14 @@ msgid ""
 "\n"
 "for each user, the file\n"
 "\"%s\"."
-msgstr "Suppression effectuée.\n\nVous voulez peut-être supprimer les éléments restants suivants en utilisant l'outil de recherche: \nle répertoire \"%s\"\n\npour chaque utilisateur, le fichier\n\"%s\"."
+msgstr "Suppression effectuée.\n\nVous voulez peut-être supprimer les éléments restants suivants en utilisant le Finder : \nle répertoire \"%s\"\n\npour chaque utilisateur, le fichier\n\"%s\"."
 
 #: uninstall.cpp:840
 #, c-format
 msgid ""
 "Enter your administrator password to completely remove %s from you computer.\n"
 "\n"
-msgstr "Inscrivez votre mot de passe administrateur pour effacer complètement %s de votre ordinateur. \n\n"
+msgstr "Tapez votre mot de passe administrateur pour effacer complètement %s de votre ordinateur. \n\n"
 
 #: uninstall.cpp:1616
 msgid "Cancel"
diff --git a/locale/fr/BOINC-Web.po b/locale/fr/BOINC-Web.po
index 9392866..b73cb53 100644
--- a/locale/fr/BOINC-Web.po
+++ b/locale/fr/BOINC-Web.po
@@ -7,14 +7,15 @@
 # 
 # Translators:
 # Jerome Cadet <jerome.cadet at pobox.com>, 2015
+# Philippe Janocha, 2016
 msgid ""
 msgstr ""
 "Project-Id-Version: BOINC\n"
 "Report-Msgid-Bugs-To: BOINC translation team <boinc_loc at ssl.berkeley.edu>\n"
-"POT-Creation-Date: 2015-06-24 13:05 PDT\n"
-"PO-Revision-Date: 2015-06-24 22:25+0000\n"
-"Last-Translator: Jerome Cadet <jerome.cadet at pobox.com>\n"
-"Language-Team: French (http://www.transifex.com/projects/p/boinc/language/fr/)\n"
+"POT-Creation-Date: 2015-07-09 18:59 PDT\n"
+"PO-Revision-Date: 2016-02-11 17:32+0000\n"
+"Last-Translator: Philippe Janocha\n"
+"Language-Team: French (http://www.transifex.com/boinc/boinc/language/fr/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -43,7 +44,7 @@ msgstr "Nous vous recommandons d'installer également VirtualBox afin que votre
 
 #: download.php:44
 msgid "Learn more about VirtualBox."
-msgstr "En apprendre plus sur VirtualBox."
+msgstr "En savoir plus sur VirtualBox."
 
 #: download.php:52
 msgid "Download BOINC + VirtualBox"
@@ -74,13 +75,13 @@ msgid ""
 "BOINC is a program that lets you donate your idle computer time to science "
 "projects like SETI at home, Climateprediction.net, Rosetta at home, World "
 "Community Grid, and many others."
-msgstr "BOINC est un programme qui vous permet d'offrir le temps de calcul inutilisé de votre ordinateur  à des projets scientifiques comme SETI at home, Climateprediction.net, Rosetta at home, World Community Grid, et beaucoup d'autres."
+msgstr "BOINC est un programme qui vous permet d'offrir le temps de calcul inutilisé de votre ordinateur  à des projets scientifiques comme SETI at home, Climateprediction.net, Rosetta at home, World Community Grid et beaucoup d'autres."
 
 #: download.php:135
 msgid ""
 "After installing BOINC on your computer, you can connect it to as many of "
 "these projects as you like."
-msgstr "Après avoir installé BOINC sur votre ordinateur, vous pouvez le connecter à autant de ces projets que vous le désirez."
+msgstr "Après avoir installé BOINC sur votre ordinateur, vous pouvez le connecter à autant de projets que vous le désirez."
 
 #: download.php:137
 msgid ""
@@ -102,7 +103,7 @@ msgstr "Prérequis système"
 msgid "Release notes"
 msgstr "Notes de publication"
 
-#: download.php:179 index.php:89
+#: download.php:179 index.php:93
 msgid "Help"
 msgstr "Aide"
 
@@ -116,7 +117,7 @@ msgstr "Historique des versions"
 
 #: download.php:182
 msgid "GPU computing"
-msgstr "calcul sur GPU"
+msgstr "calcul du processeur graphique"
 
 #: download.php:200
 msgid "BOINC: compute for science"
@@ -129,7 +130,7 @@ msgid ""
 " can: %s answer questions about BOINC and volunteer computing; %s walk you "
 "through the process of installing and using BOINC; %s troubleshoot any "
 "problems you might have."
-msgstr "L'aide en ligne BOINC vous permet de converser de vive voix avec des utilisateurs expérimentés, qui peuvent : %s répondre aux questions concernant BOINC et le calcul distribué bénévole; %s vous guider dans l'installation et l'utilisation de BOINC; %s solutionner les problèmes que vous pourriez rencontrer."
+msgstr "L'aide en ligne de BOINC vous permet de converser de vive voix avec des utilisateurs expérimentés, qui peuvent : %s répondre aux questions concernant BOINC et le calcul distribué bénévole ; %s vous guider dans l'installation et l'utilisation de BOINC ; %s solutionner les problèmes que vous pourriez rencontrer."
 
 #: help.php:21
 #, php-format
@@ -146,17 +147,17 @@ msgid ""
 "microphone and speakers or an external headset for your computer.  You can "
 "also use Skype's text-based chat system or regular email (if you don't have "
 "Skype) to communicate with Help Volunteers."
-msgstr "La meilleure façon de demander de l'aide est de la faire de vive voix. Pour cela vous devez disposer d'un microphone et d'enceintes ou d'un casque de communication. Vous pouvez également utiliser le système de tchat textuel de Skype ou plus classiquemeent le courriel (si vous ne disposez pas de Skype) pour communiquer avec les volontaires."
+msgstr "La meilleure façon de demander de l'aide est de le faire de vive voix. Pour cela vous devez disposer d'un microphone et d'enceintes ou d'un casque. Vous pouvez également utiliser le système de tchat textuel de Skype ou plus classiquemeent le courriel (si vous ne disposez pas de Skype) pour communiquer avec les bénévoles."
 
 #: help.php:31
 msgid ""
 "Volunteers speaking several languages are available. Please select a "
 "language:"
-msgstr "Des volontaires parlant plusieurs langues sont disponibles. Veuillez sélectionner une langue : "
+msgstr "Des bénévoles parlant plusieurs langues sont disponibles. Veuillez sélectionner une langue : "
 
 #: help.php:47
 msgid "Be a Help Volunteer"
-msgstr "Devenez un volontaire de support"
+msgstr "Devenez bénévole de support"
 
 #: help.php:50
 #, php-format
@@ -170,17 +171,17 @@ msgstr "Si vous êtes un utilisateur expérimenté de BOINC, nous vous encourage
 #, php-format
 msgid ""
 "If you're already a Help Volunteer: to edit your settings, %sclick here%s."
-msgstr "Si vous êtes un volontaire de support : pour éditer vos paramètres, %scliquez ici%s."
+msgstr "Si vous êtes un bénévole de support : pour éditer vos paramètres, %scliquez ici%s."
 
 #: help_funcs.php:136
 msgid ""
 "BOINC helpers are unpaid volunteers.  Their advice is not endorsed by BOINC "
 "or the University of California."
-msgstr "Les volontaires de support BOINC sont bénévoles. Leurs conseils ne sont pas sous la responsabilité de BOINC ou l'Université de Californie."
+msgstr "Les volontaires de support BOINC sont des bénévoles. Leurs conseils ne sont pas sous la responsabilité de BOINC ou de l'Université de Californie."
 
 #: help_funcs.php:139
 msgid "%1Never%2 give email address or password information to BOINC helpers."
-msgstr "%1Ne jamais%2 donner votre adresse mail ou votre mot de passe aux volontaires de support BOINC."
+msgstr "%1Ne jamais%2 donner votre adresse email ou votre mot de passe aux bénévoles de support BOINC."
 
 #: index.php:24
 msgid "Computing power"
@@ -196,7 +197,7 @@ msgstr "Statistiques"
 
 #: index.php:55
 msgid "Active:"
-msgstr "Actif:"
+msgstr "Actif :"
 
 #: index.php:55
 msgid "volunteers,"
@@ -208,7 +209,7 @@ msgstr "ordinateurs.\n"
 
 #: index.php:56
 msgid "24-hour average:"
-msgstr "moyenne sur 24 heures:"
+msgstr "moyenne sur 24 heures :"
 
 #: index.php:56
 msgid "PetaFLOPS."
@@ -219,153 +220,103 @@ msgid "News"
 msgstr "Actualités"
 
 #. "Volunteer" is used as a verb
-#: index.php:85
+#: index.php:89
 msgid "Volunteer"
 msgstr "Participant"
 
-#: index.php:88
+#: index.php:92
 msgid "Download"
 msgstr "Téléchargement"
 
-#: index.php:90 index.php:132 index.php:184
+#: index.php:94 index.php:138
 msgid "Documentation"
 msgstr "Documentation"
 
-#: index.php:91
+#: index.php:95
 msgid "Add-ons"
 msgstr "Extensions"
 
-#: index.php:92
+#: index.php:96
 msgid "Links"
 msgstr "Liens"
 
-#: index.php:97
+#: index.php:101
 msgid ""
 "Use the idle time on your computer (Windows, Mac, Linux, or Android) to cure"
 " diseases, study global warming, discover pulsars, and do many other types "
 "of scientific research.  It's safe, secure, and easy:"
-msgstr "Utilise les ressources inexploitées de votre ordinateur (Windows, Mac, Linux ou Android) pour guérir des maladies, étudier le réchauffement planétaire, découvrir des pulsars et faire beaucoup d'autres types de recherches scientifiques. C'est sans danger, sécurisé et facile:"
+msgstr "Utilise les ressources inexploitées de votre ordinateur (Windows, Mac, Linux ou Android) pour guérir des maladies, étudier le réchauffement planétaire, découvrir des pulsars et participer à beaucoup d'autres types de recherche scientifique. C'est sans danger, sécurisé et facile :"
 
-#: index.php:99
+#: index.php:103
 msgid "Choose projects"
 msgstr "Choisir des projets"
 
-#: index.php:100
+#: index.php:104
 msgid "Download BOINC software"
 msgstr "Télécharger le logiciel BOINC"
 
-#: index.php:101
+#: index.php:105
 msgid "Enter an email address and password."
 msgstr "Entrer une adresse courriel et un mot de passe."
 
-#: index.php:105
+#: index.php:109
 #, php-format
 msgid ""
 "Or, if you run several projects, try an %saccount manager%s such as "
 "%sGridRepublic%s or %sBAM!%s. "
 msgstr "Ou, si vous participez à plusieurs projets, essayez un %sgestionnaire de compte%s comme %sGridRepublic%s ou %sBAM!%s. "
 
-#: index.php:130
+#: index.php:136
 msgid "Compute with BOINC"
 msgstr "Calculer avec BOINC"
 
-#: index.php:133
+#: index.php:139
 msgid "Software updates"
 msgstr "Mises à jour logicielles"
 
-#: index.php:140
+#: index.php:146
 msgid ""
-"%1Scientists%2: use BOINC to create a %3volunteer computing project%4 giving"
-" you the computing power of thousands of CPUs."
-msgstr "%1Scientifiques%2 : utilisez BOINC pour créer un %3projet de calcul bénévole%4 vous procurant ainsi la puissance de calcul de milliers de CPUs."
+"%1Scientists%2: use BOINC to create a %3volunteer computing project%4, "
+"giving you the power of thousands of CPUs and GPUs."
+msgstr "%1Scientifiques%2 : utilisez BOINC pour créer un %3projet de calcul bénévole%4 vous procurant ainsi la puissance de calcul de milliers de processeurs."
 
-#: index.php:144
+#: index.php:150
 msgid ""
 "%1Universities%2: use BOINC to create a %3Virtual Campus Supercomputing "
 "Center%4."
-msgstr "%1Universités%2 : utilisez BOINC pour créer un %3centre de calcul d'un campus virtuel%4."
+msgstr "%1Universités%2 : utilisez BOINC pour créer un %3centre de calculs universitaire virtuel%4."
 
-#: index.php:149
+#: index.php:155
 msgid "%1Companies%2: use BOINC for %3desktop Grid computing%4."
-msgstr "%1Sociétés%2 : utilisez BOINC pour du %3desktop grid computing%4."
-
-#: index.php:161
-msgid "The BOINC project"
-msgstr "Le projet BOINC"
+msgstr "%1Sociétés%2 : utilisez BOINC pour du %3calcul distribué%4."
 
 #: index.php:167
+msgid "About BOINC"
+msgstr "À propos de BOINC"
+
+#: index.php:181
 msgid "Message boards"
-msgstr "Forum de discussion"
+msgstr "Forums de discussion"
 
-#: index.php:168
+#: index.php:182
 msgid "Email lists"
 msgstr "Listes email"
 
-#: index.php:169
-msgid "Personnel and contributors"
-msgstr "Personnel et contributeurs"
-
-#: index.php:170
+#: index.php:183
 msgid "Events"
-msgstr "Evènements"
-
-#: index.php:171
-msgid "Papers and talks"
-msgstr "Publications et discussions"
-
-#: index.php:172
-msgid "Research projects"
-msgstr "Projets de recherche"
+msgstr "Évènements"
 
-#: index.php:173
-msgid "Logos and graphics"
-msgstr "Logos et graphiques"
-
-#: index.php:174
-msgid "and"
-msgstr "et"
-
-#: index.php:178
+#: index.php:184
 msgid "Source code"
 msgstr "Code source"
 
-#: index.php:179
-msgid "Help wanted"
-msgstr "Aidez-nous ! "
-
-#: index.php:181
-msgid "Programming"
-msgstr "Programmation"
-
-#: index.php:182
-msgid "Translation"
-msgstr "Traduction"
-
-#: index.php:183
-msgid "Testing"
-msgstr "Tests"
-
-#: index.php:185
-msgid "Publicity"
-msgstr "Publicité"
-
-#: index.php:187
-msgid "Software development"
-msgstr "Développement logiciel"
-
-#: index.php:188
+#: index.php:186
 msgid "APIs for add-on software"
 msgstr "API pour extensions logicielles"
 
-#: index.php:230
-#, php-format
-msgid ""
-"Open-source software for %svolunteer computing%s and %sgrid computing%s."
-msgstr "Logiciel libre pour le %scalcul bénévole%s et %sle calcul distribué%s."
-
-#: index.php:243
-msgid "BOINC is based at The University of California, Berkeley"
-msgstr "BOINC est basé à l'Université de Californie, Berkeley"
+#: index.php:231
+msgid "Open-source software for volunteer computing"
+msgstr "Logiciel open-source pour le calcul distribué bénévole."
 
 #: projects.inc:19
 msgid "Distributed sensing"
@@ -383,7 +334,7 @@ msgstr "Sismologie"
 msgid ""
 "Quake-Catcher Network is developing the world's largest seismic network "
 "using sensors attached to computers and smartphones."
-msgstr "Le Réseau de Capteurs Sismiques QCN développe le plus grand réseau sismologique au monde en utilisant des capteurs reliés à des ordinateurs et à des smartphones connectés sur Internet."
+msgstr "Le Réseau de Capteurs Sismiques QCN développe le plus grand réseau sismologique au monde en utilisant les capteurs liés aux ordinateurs et aux smartphones connectés à Internet."
 
 #: projects.inc:34
 msgid "BOINC Poland Foundation"
@@ -398,12 +349,23 @@ msgid ""
 "Radioactive at Home is creating a free and continuously updated map of "
 "radiation levels using sensors connected to volunteers' computers.  You must"
 " buy a sensor to participate."
-msgstr "Ce projet créé une cartographie gratuite continuellement à jour des niveaux de radiation en utilisant des capteurs reliés aux ordinateurs des volontaires. Vous devez acheter un capteur pour y participer."
+msgstr "Ce projet crée une cartographie gratuite continuellement mise à jour des niveaux de radiation en utilisant les capteurs reliés aux ordinateurs des participants. Vous devez acheter un capteur pour y participer."
 
 #: projects.inc:45
 msgid "Cognitive science and artifical intelligence"
 msgstr "Science cognitive et intelligence artificielle"
 
+#: projects.inc:51
+msgid "Cognitive Science"
+msgstr "Science cognitive"
+
+#: projects.inc:52
+msgid ""
+"MindModeling at Home uses computational cognitive process modeling to better "
+"understand the human mind, and specifically to study the mechanisms and "
+"processes that enable and moderate human performance and learning."
+msgstr "MindModeling at Home utilise la modélisation des processus cognitifs par ordinateur afin de mieux comprendre l'esprit humain, et en particulier d'étudier les mécanismes et les processus qui permettent et contrôlent la performance humaine et l'apprentissage."
+
 #: projects.inc:70 projects.inc:467 projects.inc:591 projects.inc:601
 #: projects.inc:657
 msgid "Private"
@@ -425,6 +387,26 @@ msgstr "Analyser et convertir les filets sémantiques pour une utilisation dans
 msgid "Biology and Medicine"
 msgstr "Biologie et médecine"
 
+#: projects.inc:88
+msgid "Medical physiology"
+msgstr "Physiologie médicale"
+
+#: projects.inc:89
+msgid ""
+"DENIS at Home does cardiac electrophysiological simulations, studying the "
+"electrical activity of the heart."
+msgstr "DENIS at Home effectue des simulations électrophysiologiques cardiaques, en étudiant l'activité électrique du cœur."
+
+#: projects.inc:98
+msgid "Molecular biology"
+msgstr "Biologie moléculaire"
+
+#: projects.inc:99
+msgid ""
+"RNA World seeks to identify, analyze, structurally predict and design RNA "
+"molecules on the basis of established bioinformatics software."
+msgstr "RNA World cherche à identifier, analyser, prévoir structurellement et concevoir des molécules d’ARN à l'aide de logiciels de bio-informatique reconnus."
+
 #: projects.inc:107
 msgid "University College Dublin"
 msgstr "University College Dublin"
@@ -439,7 +421,7 @@ msgid ""
 " medication. We therefore urgently need to discover new drugs, targeting new"
 " proteins in the parasite. The FightNeglectedDiseases at Home project is aimed "
 "at finding these new targets."
-msgstr "Le parasite causant la malaria continue de développer une résistance aux médicaments disponibles. C'est pourquoi, il est urgent de découvrir de nouveaux médicaments pour cibler de nouvelles protéines du parasite. Le projet Find at Home a pour but de trouver ces nouvelles cibles."
+msgstr "Le parasite causant la malaria continue de développer une résistance aux médicaments disponibles. C'est pourquoi il est urgent de découvrir de nouveaux médicaments pour cibler de nouvelles protéines du parasite. Le projet Find at Home a pour but de trouver ces nouvelles cibles."
 
 #: projects.inc:117
 msgid "University of Karlsruhe (Germany)"
@@ -456,7 +438,7 @@ msgid ""
 "the proteins interact with one another, to understand diseases related to "
 "protein malfunction or aggregation, and to develop new drugs on the basis of"
 " the three-dimensions structure of biologically important proteins."
-msgstr "POEM @ HOME utilise une approche informatique pour prédire la structure des protéines biologiquement actives, pour comprendre les mécanismes de traitement du signal lorsque les protéines interagissent les unes avec les autres, pour comprendre les maladies liées à un dysfonctionnement des protéines ou l'agrégation, et à développer de nouveaux médicaments sur la base de structures tridimensionnelle des protéines biologiquement importantes."
+msgstr "POEM at HOME utilise une approche informatique pour prédire la structure des protéines biologiquement actives, pour comprendre les mécanismes de traitement du signal lorsque les protéines interagissent les unes avec les autres, pour comprendre les maladies liées à un dysfonctionnement des protéines ou l'agrégation, et à développer de nouveaux médicaments sur la base de structures tridimensionnelles des protéines biologiquement importantes."
 
 #: projects.inc:147
 msgid "Barcelona Biomedical Research Park (PRBB)"
@@ -472,7 +454,7 @@ msgid ""
 "molecular dynamics code (CellMD) specially optimized to run on NVIDIA GPUs. "
 "New biomedical applications suddenly become possible giving a new role to "
 "computational biology for biomedical research."
-msgstr "GPUGrid.net ouvre des nouveaux scénarios informatiques par l'emploi du premier code dynamique moléculaire atomique (CeIIMD) spécialement optimisé pour fonctionner sur des chipsets graphiques NVIDIA. De nouvelles applications biomédicales deviennent soudainement possibles donnant un nouveau rôle à la biologie informatique pour la recherche biomédicale."
+msgstr "GPUGrid.net ouvre des nouveaux scénarios informatiques par l'emploi du premier code dynamique moléculaire atomique (CeIIMD) spécialement optimisé pour fonctionner sur les processeurs graphiques NVIDIA. De nouvelles applications biomédicales deviennent alors possibles donnant un nouveau rôle à la biologie informatique pour la recherche biomédicale."
 
 #: projects.inc:175
 msgid ""
@@ -507,7 +489,7 @@ msgid ""
 "is extremely computer intensive, requiring simulations of large human "
 "populations with a diverse set of parameters related to biological and "
 "social factors that influence the distribution of the disease. "
-msgstr "Les modèles de simulation dynamique de transmission et d'effets sur la santé de la malaria sont un outil important pour le contrôle de la malaria. Ils peuvent être utilisés pour déterminer les stratégies optimales pour livrer des moustiquaires, la chimiothérapie, ou de nouveaux vaccins qui sont actuellement en cours de développement et de test. Une telle modélisation est extrêmement gourmande en puissance de calcul, exigeant des simulations sur de larges populations humaines avec [...]
+msgstr "Les modèles de simulation dynamique de transmission et d'effets sur la santé de la malaria sont un outil important pour le contrôle de la malaria. Ils peuvent être utilisés pour déterminer les stratégies optimales pour livrer des moustiquaires, la chimiothérapie ou de nouveaux vaccins qui sont actuellement en cours de développement et de test. Une telle modélisation est extrêmement gourmande en puissance de calcul, exigeant des simulations sur de larges populations humaines avec  [...]
 
 #: projects.inc:211
 msgid "University of Washington"
@@ -525,7 +507,7 @@ msgid ""
 "couldn't possibly attempt without your help. You will also be helping our "
 "efforts at designing new proteins to fight diseases such as HIV, malaria, "
 "cancer, and Alzheimer's"
-msgstr "Déterminer les structures tridimensionnelles de protéines dans la recherche qui peut en fin de compte mener à la découverte de remèdes pour quelques maladies humaines majeures. En calculant pour Rosetta at home vous nous aiderez à accélérer et prolonger notre recherche bien plus que nous ne pourrions le faire sans votre aide. Vous nous aiderez également dans nos efforts à concevoir de nouvelles protéines pour combattre les maladies telles que HIV, la malaria, le Cancer, et l'Alzheimer"
+msgstr "Déterminer les structures tridimensionnelles de protéines dans la recherche qui peut mener à la découverte de remèdes pour quelques maladies humaines majeures. En calculant pour Rosetta at home, vous nous aiderez à accélérer et prolonger notre recherche bien plus que nous ne pourrions le faire sans votre aide. Vous nous aiderez également dans nos efforts à concevoir de nouvelles protéines pour combattre les maladies telles que VIH, la malaria, le cancer et la maladie d’Alzheimer."
 
 #: projects.inc:231
 msgid "Earth Sciences"
@@ -549,7 +531,7 @@ msgid ""
 "changes and also to things like changes in carbon dioxide and the sulphur "
 "cycle. This will allow us to explore how climate may change in the next "
 "century under a wide range of different scenarios."
-msgstr "Étudier les approximations qui doivent être faites à L'État-de-L'Art des modèles climatiques. En relançant le modèle des centaines de fois, nous espérons trouver comment le modèle réagit aux petits ajustements de ces approximations - suffisamment petites pour ne pas rendre ces approximations irréalistes. Cela nous permettra de mieux comprendre à quel point nos modèles sont sensibles à ces petits changements et aussi à des choses comme des changements dans le dioxyde de carbone et [...]
+msgstr "Étudier les approximations des modèles climatiques les plus pointus. En relançant le modèle des centaines de fois, nous espérons trouver comment le modèle réagit aux petits ajustements de ces approximations - suffisamment petites pour ne pas rendre ces approximations irréalistes. Cela nous permettra de mieux comprendre à quel point nos modèles sont sensibles à ces petits changements et aussi à des choses comme des changements dans le dioxyde de carbone et le cycle du soufre. Cela [...]
 
 #: projects.inc:253
 msgid "Physical Science"
@@ -563,7 +545,7 @@ msgstr "Ingénierie Mécanique"
 msgid ""
 "Currently we are calculating the optimum design of a structure call the 52 "
 "bar truss"
-msgstr "Nous sommes en train de calculer le design optimum d'une structure appelée le \"52 bar truss\""
+msgstr "Nous sommes en train de calculer le design optimum d'une structure appelée le \"52-bar truss\""
 
 #: projects.inc:269 projects.inc:328 projects.inc:338
 msgid "Astronomy"
@@ -579,6 +561,45 @@ msgid ""
 "better understand the distant universe."
 msgstr "TheSkyNet POGS est un projet d'astronomie qui étudie 16 propriétés différentes des galaxies, comme la luminosité, la masse, la quantité de poussière et la vitesse de formation des étoiles. Nous utilisons la puissance de traitement de votre ordinateur pour mener des calculs pixel par pixel sur plusieurs longueurs d'onde (ultraviolet, lumière visible et proche infrarouge) des images de galaxies pour produire un atlas qui aidera les astronomes à mieux comprendre l'univers lointain."
 
+#: projects.inc:280 projects.inc:366
+msgid "Astrophysics"
+msgstr "Astrophysique"
+
+#: projects.inc:281
+msgid ""
+"The aim of the project is to derive shapes and spin for a significant part "
+"of the asteroid population. As input data, we use any asteroid photometry "
+"that is available. The results are asteroid convex shape models with the "
+"direction of the spin axis and the rotation period."
+msgstr "Le but du projet est de déduire des formes et des orbites pour une partie importante de la population d'astéroïdes. Les données en entrée utilisées sont toutes les photométries disponibles d'astéroïdes. Les résultats sont des modèles de formes convexes d'astéroïdes avec la direction de l'axe de rotation et la période de rotation."
+
+#: projects.inc:290
+msgid "Aerospace-related science and engineering"
+msgstr "Science et ingénierie liées à l'aérospatiale"
+
+#: projects.inc:291
+msgid ""
+"Constellation is a platform for aerospace-related simulations, including "
+"trajectory optimization of launchers, satellites and probes, simulation of "
+"Moon's near-surface exosphere, and analysis of dynamic systems of "
+"exploration-rovers"
+msgstr "Constellation est une plate-forme pour les simulations liées à l'aérospatiale, notamment l'optimisation de la trajectoire de lanceurs, satellites et sondes, la simulation de l'exosphère proche de la surface de la Lune et l'analyse des systèmes dynamiques des rovers d'exploration"
+
+#: projects.inc:294
+msgid "Perform aerospace-related simulations"
+msgstr "Effectuer des simulations liées à l'aérospatiale"
+
+#: projects.inc:329
+msgid ""
+"Universe at Home aims to create the first database of the simulated stellar "
+"content of the Universe, from the earliest stars to the most exotic black "
+"hole binaries."
+msgstr "Univers at Home a pour but de créer la première base de données du contenu stellaire simulé de l'Univers, depuis les premières étoiles jusqu'aux trous noirs binaires les plus exotiques."
+
+#: projects.inc:332
+msgid "Do research in physics and astronomy"
+msgstr "Faire des recherches en physique et en astronomie"
+
 #: projects.inc:337
 msgid "Rensselaer Polytechnic Institute"
 msgstr "Institut Polytechnique Rensselaer"
@@ -588,7 +609,11 @@ msgid ""
 "The goal of Milkyway at Home is to create a highly accurate three dimensional "
 "model of the Milky Way galaxy using data gathered by the Sloan Digital Sky "
 "Survey."
-msgstr "Le but de Milkyway at Home est de créer un modèle tridimensionnel de haute précision de la Galaxie Voie Lactée en utilisant les données recueillies par The Sloan Digital Sky Survey (SDSS)."
+msgstr "Le but de Milkyway at Home est de créer un modèle tridimensionnel de haute précision de la Voie Lactée en utilisant les données recueillies par The Sloan Digital Sky Survey (SDSS)."
+
+#: projects.inc:342
+msgid "Study the structure of the Milky Way galaxy"
+msgstr "Étudier la structure de la galaxie de la Voie Lactée"
 
 #: projects.inc:347
 msgid "Leiden University, The Netherlands"
@@ -606,16 +631,16 @@ msgid ""
 " Dynamics jobs. In this way students have used the grid to simulate liquid "
 "argon, or to test the validity of the ideal gas law by actually doing the "
 "simulations through the grid."
-msgstr "Calculs scientifiques de surface en utilisant la dynamique classique. Leiden Classical permet à des bénévoles, des étudiants et des scientifiques à soumettre leurs calculs personnels à la grille. Chaque utilisateur a sa file d'attente personnelle pour des tâches de dynamique classique. Ainsi, des étudiants ont utilisé la grille pour simuler l'argon liquide, ou pour tester la validité de la loi des gaz parfaits en faisant des simulations à travers la grille de calcul."
+msgstr "Calculs scientifiques de surface en utilisant la dynamique classique. Leiden Classical permet à des bénévoles, des étudiants et des scientifiques de soumettre leurs calculs personnels à la grille. Chaque utilisateur a sa file d'attente personnelle pour des tâches de dynamique classique. Ainsi, des étudiants ont utilisé la grille pour simuler l'argon liquide ou pour tester la validité de la loi des gaz parfaits en faisant des simulations à travers la grille de calcul."
+
+#: projects.inc:352
+msgid "Help students do atomic simulations"
+msgstr "Aider les étudiants à faire des simulations atomiques"
 
 #: projects.inc:365
 msgid "Univ. of Wisconsin - Milwaukee, Max Planck Institute"
 msgstr "Université du Wisconsin - Milwaukee, Institut Max Planck"
 
-#: projects.inc:366
-msgid "Astrophysics"
-msgstr "Astrophysique"
-
 #: projects.inc:367
 msgid ""
 "Search for spinning neutron stars (also called pulsars) using data from the "
@@ -623,7 +648,11 @@ msgid ""
 "observatory.  Einstein at Home is a World Year of Physics 2005 project "
 "supported by the American Physical Society (APS) and by a number of "
 "international organizations."
-msgstr "Recherche d'étoiles à neutrons en rotation (également appelés pulsars) en utilisant les données des détecteurs d'ondes gravitationnelles LIGO et GEO, et de l'observatoire radio d'Arecibo. Einstein at Home est un projet de l'Année Mondiale de la Physique 2005 soutenu par l'American Physical Society (APS) et par un certain nombre d'organisations internationales."
+msgstr "Recherche d'étoiles à neutrons en rotation (également appelées pulsars) en utilisant les données des détecteurs d'ondes gravitationnelles LIGO et GEO, et de l'observatoire radio d'Arecibo. Einstein at Home est un projet de l'Année Mondiale de la Physique 2005 soutenu par l'American Physical Society (APS) et par un certain nombre d'organisations internationales."
+
+#: projects.inc:370
+msgid "Help detect pulsars and gravitational waves"
+msgstr "Aider à détecter les pulsars et les ondes gravitationnelles "
 
 #: projects.inc:383 projects.inc:393 projects.inc:403
 msgid "CERN (European Organization for Nuclear Research)"
@@ -642,12 +671,20 @@ msgid ""
 "the design of LHC and its detectors."
 msgstr "Le grand collisionneur de hadrons (LHC) est un accélérateur de particules au CERN, l'organisation européenne pour la recherche nucléaire, le plus grand laboratoire mondial de physique de la matière. C'est l’instrument le plus puissant jamais construit pour l'étude des propriétés de la matière. LHC at home exécute des simulations pour améliorer la conception du LHC et de ses détecteurs."
 
+#: projects.inc:388
+msgid "Improve the design of the Large Hadron Collider"
+msgstr "Améliorer le design du Large Hadron Collider"
+
 #: projects.inc:395
 msgid ""
 "This project uses CERN-developed virtual machine technology for LHC event "
 "physics simulation on volunteer computers.  Requires that you install "
 "VirtualBox on your computer"
-msgstr "Ce projet utilise la technologie de machines virtuelles développées par le CERN pour simuler sur les ordinateurs des volontaires, des évènements physiques propres au LHC. Cela requiert l'installation de VirtualBox sur votre ordinateur"
+msgstr "Ce projet utilise la technologie de machines virtuelles développées par le CERN pour simuler sur les ordinateurs des participants des évènements physiques propres au LHC. Cela requiert l'installation de VirtualBox sur votre ordinateur"
+
+#: projects.inc:398
+msgid "Simulate high-energy particle collisions"
+msgstr "Simuler des collisions de particules à haute énergie"
 
 #: projects.inc:405
 msgid ""
@@ -657,6 +694,10 @@ msgid ""
 "extraordinary high energy."
 msgstr "ATLAS at Home utilise le calcul bénévole pour exécuter des simulations pour ATLAS, une expérience de physique des particules au Grand collisionneur de hadrons du CERN. ATLAS recherche de nouvelles particules et des procédés à l'aide de collisions frontales de protons à des énergies extraordinairement hautes."
 
+#: projects.inc:408
+msgid "Simulate high-energy particle collisions for CERN"
+msgstr "Simuler des collisions de particules à haute énergie pour le CERN"
+
 #: projects.inc:413
 msgid "University of California, Berkeley"
 msgstr "Université de Californie, Berkeley"
@@ -672,26 +713,48 @@ msgid ""
 "radio SETI, uses radio telescopes to listen for narrow-bandwidth radio "
 "signals from space. Such signals are not known to occur naturally, so a "
 "detection would provide evidence of extraterrestrial technology."
-msgstr "SETI (Search for Extraterrestrial Intelligence) est un domaine scientifique dont l'objectif est de détecter la vie intelligente en dehors de la Terre. Une approche, connue sous le nom de radio SETI, utilise des radiotélescopes pour écouter les signaux radio à bande passante étroite de l'espace. Ces signaux ne sont pas connus pour se produire naturellement, en détecter serait une preuve de la technologie extraterrestre."
+msgstr "SETI (Search for Extraterrestrial Intelligence) est un champ scientifique dont l'objectif est de détecter la vie intelligente en dehors de la Terre. Une approche, connue sous le nom de radio SETI, utilise des radiotélescopes pour écouter les signaux radio à bande passante étroite de l'espace. Ces signaux ne sont pas connus pour se produire naturellement, en détecter serait une preuve de la technologie extraterrestre."
+
+#: projects.inc:418
+msgid "Search for evidence of extra-terrestrial life"
+msgstr "Rechercher des preuves de vie extraterrestre"
 
 #: projects.inc:442
 msgid "Multiple applications"
 msgstr "Applications multiples"
 
+#: projects.inc:448
+msgid "Molecular biology, Computer Science"
+msgstr "Biologie moléculaire, informatique"
+
+#: projects.inc:449
+msgid ""
+"The Citizen Science Grid is dedicated to supporting a wide range of research"
+" and educational projects using volunteer computing and citizen science."
+msgstr "Le Citizen Science Grid est dédié à soutenir un large éventail de projets de recherche et d'enseignement en utilisant le calcul bénévole et la science citoyenne."
+
+#: projects.inc:452
+msgid "Support science from the University of North Dakota"
+msgstr "Soutenir la science avec l'Université du Dakota du Nord"
+
 #: projects.inc:457
 msgid "Chinese Academy of Sciences"
 msgstr "Académie Chinoise des Sciences"
 
 #: projects.inc:458
 msgid "Physics, biochemistry, and others"
-msgstr "Physique, biochimie, et autres"
+msgstr "Physique, biochimie et autres"
 
 #: projects.inc:459
 msgid ""
 "The objective of CAS at home is to encourage and assist scientists in China to "
 "adopt the technologies of volunteer computing and volunteer thinking for "
 "their research."
-msgstr "L'objectif de CAS at home est d'encourager et d'assister les scientifiques en Chine à adopter les technologies de calcul volontaire partagé et la réflexion des volontaires pour leur recherche."
+msgstr "L'objectif de CAS at home est d'encourager et d'assister les scientifiques en Chine à adopter les technologies de calcul bénévole distribué pour leur recherche."
+
+#: projects.inc:462
+msgid "Help Chinese researchers"
+msgstr "Aider les chercheurs chinois"
 
 #: projects.inc:468
 msgid "Mathematics, physics, evolution"
@@ -701,7 +764,11 @@ msgstr "Mathématique, physique, évolution"
 msgid ""
 "Yoyo at home is an adapter between BOINC and several existing volunteer "
 "computing projects: ECM, Muon, Evolution at home, and distributed.net"
-msgstr "Yoyo at home est un adaptateur entre BOINC et plusieurs projets existants de calcul partagé: ECM, Muon, Evolution at home, et distributed.net"
+msgstr "Yoyo at home est un adaptateur entre BOINC et plusieurs projets existants de calcul partagé : ECM, Muon, Evolution at home et distributed.net"
+
+#: projects.inc:472
+msgid "Do research in math, physics, and evolution"
+msgstr "Faire des recherches en mathématiques, en physique et sur l'évolution"
 
 #: projects.inc:477 projects.inc:677
 msgid "MTA-SZTAKI Laboratory of Parallel and Distributed Systems (Hungary)"
@@ -717,7 +784,11 @@ msgid ""
 "grid network of Europe by allowing service grids to send workunits to be "
 "processed by the volunteers of this project. The scientific projects covered"
 " by the project include math, physics, biology, etc."
-msgstr "Le projet EGDeS at Home Beta intègre le calcul bénévole dans le réseau de grille de service de l'Europe en permettant aux grilles existantes d'envoyer des unités de travail pour être traitées par des bénévoles. Les projets scientifiques couverts par le projet comprennent les mathématiques, la physique, la biologie, etc"
+msgstr "Le projet EGDeS at Home Beta intègre le calcul bénévole dans le réseau de grille de service de l'Europe en permettant aux grilles existantes d'envoyer des unités de travail pour être traitées par des bénévoles. Les projets scientifiques couverts par le projet comprennent les mathématiques, la physique, la biologie, etc."
+
+#: projects.inc:482
+msgid "Help European researchers"
+msgstr "Aider les chercheurs européens"
 
 #: projects.inc:487
 msgid "Spanish universities and research centers"
@@ -729,7 +800,11 @@ msgstr "Plusieurs projets de recherche espagnols"
 
 #: projects.inc:489
 msgid "Research in physics, material science, and biomedicine"
-msgstr "Recherche en physique, science des matériaux, et biomédecine"
+msgstr "Recherche en physique, science des matériaux et biomédecine"
+
+#: projects.inc:492
+msgid "Help Spanish researchers"
+msgstr "Aider les chercheurs espagnols"
 
 #: projects.inc:497
 msgid "IBM Corporate Citizenship"
@@ -737,7 +812,7 @@ msgstr "IBM Corporate Citizenship"
 
 #: projects.inc:498
 msgid "Medical, environmental and other humanitarian research"
-msgstr "Recherches médicale, environnementale et autre recherche humanitaire"
+msgstr "Recherches médicales, environnementales et autres recherches humanitaires"
 
 #: projects.inc:499
 msgid ""
@@ -745,16 +820,58 @@ msgid ""
 "problems by creating the world's largest volunteer computing grid.  Research"
 " includes HIV-AIDS, cancer, tropical and neglected diseases, solar energy, "
 "clean water and many more."
-msgstr "Pour aider des recherches à but non lucratif critiques sur les problèmes les plus urgents de l'humanité en créant le plus grand réseau de calcul partagé volontaire. La recherche inclue le SIDA, le cancer, les maladies tropicales et orphelines, l'énergie solaire, l'eau propre, et bien d'autres."
+msgstr "Pour aider des recherches cruciales à but non lucratives sur les problèmes les plus urgents de l'humanité en créant le plus grand réseau de calcul partagé bénévole. La recherche inclut le SIDA, le cancer, les maladies tropicales et orphelines, l'énergie solaire, l'eau propre et bien d’autres encore."
+
+#: projects.inc:502
+msgid "Do biomedical and environmental research"
+msgstr "Faire des recherches biomédicales et environnementales"
 
 #: projects.inc:507
 msgid "Mathematics, computing, and games"
 msgstr "Mathématiques, informatique et jeux"
 
+#: projects.inc:533 projects.inc:602 projects.inc:658 projects.inc:668
+#: projects.inc:678
+msgid "Mathematics"
+msgstr "Mathématiques"
+
+#: projects.inc:534
+msgid ""
+"NumberFields at home searches for fields with special properties. The primary "
+"application of this research is in the realm of algebraic number theory. "
+"Number theorists can mine the data for interesting patterns to help them "
+"formulate conjectures about number fields. Ultimately, this research will "
+"lead to a deeper understanding of the profound properties of numbers, the "
+"basic building blocks of all mathematics."
+msgstr "NumberFields at home recherche des champs numériques ayant des propriétés particulières. L'application principale de cette recherche est du domaine de la théorie algébrique des nombres. Les théoriciens des nombres peuvent exploiter les données ayant des propriétés intéressantes pour les aider à formuler des conjectures sur les champs numériques. Cette recherche mènera à une meilleure compréhension des propriétés profondes des nombres, qui sont les briques de base de toutes les mathé [...]
+
+#: projects.inc:537
+msgid "Do research in algebraic number theory"
+msgstr "Faire de la recherche en théorie algébrique des nombres"
+
+#: projects.inc:553
+msgid "Computer Science"
+msgstr "Sciences informatiques"
+
+#: projects.inc:554
+msgid ""
+"Solve hard and practically important problems (discrete functions inversion "
+"problems, discrete optimization, bioinformatics, etc.) that can be "
+"effectively reduced to Boolean satisfiability problem."
+msgstr "Résoudre des problèmes difficiles et pratiques importants (problèmes d'inversion de fonctions discrètes, optimisation discrète, bio-informatique, etc) qui peuvent être efficacement réduits à un problème de satisfaisabilité booléenne."
+
+#: projects.inc:557
+msgid "Study computational complexity"
+msgstr "Étude de la complexité des calculs informatiques"
+
 #: projects.inc:582
 msgid "Cryptography and combinatorics"
 msgstr "Cryptographie et combinatoire"
 
+#: projects.inc:583 projects.inc:586
+msgid "Run applications from distributed.net"
+msgstr "Exécuter les applications de distributed.net"
+
 #: projects.inc:592
 msgid "Cryptography"
 msgstr "Chiffrement"
@@ -763,16 +880,20 @@ msgstr "Chiffrement"
 msgid ""
 "Attempt to decode 3 original Enigma messages. The signals were intercepted "
 "in the North Atlantic in 1942 and are believed to be unbroken."
-msgstr "Tente de décoder 3 messages originaux d'Enigma. Les signaux ont été interceptés dans l'Atlantique nord en 1942 et sont réputés ne pas avoir été décodés."
+msgstr "Tenter de décoder des messages des machines Enigma. Ces signaux ont été interceptés dans l'Atlantique nord en 1942 et sont réputés indéchiffrables."
 
-#: projects.inc:602 projects.inc:658 projects.inc:668 projects.inc:678
-msgid "Mathematics"
-msgstr "Mathématiques"
+#: projects.inc:596
+msgid "Decode WWII submarine messages"
+msgstr "Décoder les messages des sous-marins allemands de la Deuxième Guerre mondiale"
 
 #: projects.inc:603
 msgid "Study the Collatz Conjecture, an unsolved conjecture in mathematics"
 msgstr "Étude de la conjecture de Collatz, une conjecture non résolue en mathématique."
 
+#: projects.inc:606
+msgid "Study the Collatz Conjecture"
+msgstr "Étudier la conjecture de Collatz"
+
 #: projects.inc:611
 msgid "California State University Fullerton"
 msgstr "Université de l’État de Californie à Fullerton"
@@ -791,12 +912,20 @@ msgid ""
 "hundreds of digits long."
 msgstr "NFS at Home est un projet de recherche qui utilise des ordinateurs connectés à Internet pour calculer des étapes de factorisation de grands nombres entiers (Sieve). En tant que jeune étudiant vous avez eu votre première expérience en décomposant un nombre entier en facteurs premiers, tels que 15 = 3 * 35 = 5 ou 5 * 7. NFS at Home est la continuation de cette expérience, mais avec des nombres entiers longs de centaines de chiffres."
 
+#: projects.inc:616
+msgid "Study the factorization of large integers"
+msgstr "Étudier la factorisation des grands nombres entiers"
+
 #: projects.inc:659
 msgid ""
 "Primegrid has multiple projects searching for different forms of very large "
 "prime numbers, including searching for the largest known prime number."
 msgstr "Primegrid regroupe divers projets de recherche sur différentes formes de très grands nombres premiers, incluant des recherches sur les plus grands nombres premiers connus."
 
+#: projects.inc:662
+msgid "Search for large prime numbers"
+msgstr "Rechercher de grands nombres entiers"
+
 #: projects.inc:667
 msgid "Hochschule RheinMain University of Applied Sciences"
 msgstr "Université de Hochschule RheinMain des sciences appliquées"
@@ -807,12 +936,27 @@ msgid ""
 "of prime numbers"
 msgstr "Recherche de contre-exemples à deux conjectures liées à l'identification de nombres premiers"
 
+#: projects.inc:672
+msgid "Study the properties of prime numbers"
+msgstr "Étudier les propriétés des nombres entiers"
+
 #: projects.inc:679
 msgid ""
 "Find all the generalized binary number systems (in which bases are matrices "
 "and digits are vectors) up to dimension 11."
 msgstr "Trouvez tous les systèmes de nombre binaires généralisés (dans lequel les bases sont des matrices et les chiffres sont des vecteurs) jusqu'à la dimension 11."
 
+#: projects.inc:682
+msgid "Study number theory"
+msgstr "Étudier la théorie des nombres"
+
+#: projects.inc:739
+msgid ""
+"Testing and comparison of heuristic methods for getting separations of "
+"parallel algorithms working in the CAD system for designing logic control "
+"systems"
+msgstr "Test et comparaison des méthodes heuristiques pour obtenir des séparations d'algorithmes parallèles en travaillant avec des systèmes de CAO pour la conception de systèmes de contrôle logiques"
+
 #: ../html/inc/news.inc:40
 msgid "Comment"
 msgstr "Commentaires"
diff --git a/locale/hu/BOINC-Manager.po b/locale/hu/BOINC-Manager.po
index 10ab0f9..09a4a69 100644
--- a/locale/hu/BOINC-Manager.po
+++ b/locale/hu/BOINC-Manager.po
@@ -12,7 +12,7 @@ msgstr ""
 "Project-Id-Version: BOINC\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2015-10-16 17:27-0500\n"
-"PO-Revision-Date: 2016-02-10 15:57+0000\n"
+"PO-Revision-Date: 2016-02-15 20:26+0000\n"
 "Last-Translator: Gabor Cseh <csega at mailbox.hu>\n"
 "Language-Team: Hungarian (http://www.transifex.com/boinc/boinc/language/hu/)\n"
 "MIME-Version: 1.0\n"
@@ -777,24 +777,24 @@ msgstr "%s sikeresen kapcsolódott az internetre."
 #: clientgui/BOINCDialupManager.cpp:331
 #, c-format
 msgid "%s failed to connect to the Internet."
-msgstr "%s nem tudott az internetre kapcsolódni."
+msgstr "A(z) %s nem tudott az internetre kapcsolódni."
 
 #: clientgui/BOINCDialupManager.cpp:372
 #, c-format
 msgid ""
 "%s has detected it is now connected to the Internet.\n"
 "Updating all projects and retrying all transfers."
-msgstr "%s érzékelte, hogy kapcsolódott az internetre.\nMinden projekt frissítése, és az átvitelek újrapróbálása."
+msgstr "A(z) %s érzékelte, hogy kapcsolódott az internetre.\nMinden projekt frissítése, és az átvitelek újrapróbálása."
 
 #: clientgui/BOINCDialupManager.cpp:417
 #, c-format
 msgid "%s has successfully disconnected from the Internet."
-msgstr "%s sikeresen lekapcsolódott az internetről."
+msgstr "A(z) %s sikeresen lekapcsolódott az internetről."
 
 #: clientgui/BOINCDialupManager.cpp:433
 #, c-format
 msgid "%s failed to disconnected from the Internet."
-msgstr "%s nem tudott lekapcsolódni az internetről."
+msgstr "A(z) %s nem tudott lekapcsolódni az internetről."
 
 #: clientgui/BOINCGUIApp.cpp:356
 #, c-format
@@ -807,14 +807,14 @@ msgid ""
 " or\n"
 "  - contact your administrator to add you to the 'boinc_master'\n"
 "     user group."
-msgstr "Jelenleg nem jogosult a kliens kezelésére.\n\n%s használata ezzel a felhasználóval:\n- telepítse újra %s-t és válaszoljon \"Igen\"-nel a\nnem adminisztratív felhasználóra vonatkozó kérdésre\nvagy\n- lépjen kapcsolatba a rendszergazdával és kérje meg, hogy adja hozzá önt a\n'boinc_master' felhasználói csoporthoz."
+msgstr "Jelenleg nem vagy jogosult a kliens kezelésére.\n\n%s használata ezzel a felhasználóval:\n- telepítsd újra %s-t és válaszolj \"Igen\"-nel a\nnem adminisztratív felhasználókra vonatkozó kérdésre\nvagy\n- lépj kapcsolatba a rendszergazdával és kérd meg, hogy adjon hozzá a\n'boinc_master'\nfelhasználói csoporthoz."
 
 #: clientgui/BOINCGUIApp.cpp:362
 #, c-format
 msgid ""
 "%s ownership or permissions are not set properly; please reinstall %s.\n"
 "(Error code %d"
-msgstr "A(z) %s tulajdonosi és hozzáférési jogai nincsenek megfelelően beállítva; kérjük, telepítse újra a(z) %s-t.\n(Hibakód %d"
+msgstr "A(z) %s tulajdonosi és hozzáférési jogai nincsenek megfelelően beállítva; kérjük, telepítsd újra a(z) %s-t.\n(Hibakód %d"
 
 #: clientgui/BOINCGUIApp.cpp:368
 msgid " at "
@@ -829,7 +829,7 @@ msgstr ")"
 msgid ""
 "A reboot is required in order for BOINC to run properly.\n"
 "Please reboot your computer and try again."
-msgstr "A BOINC megfelelő futásához újraindítás szükséges.\nKérjük, indítsa újra a számítógépét, majd próbálja újra."
+msgstr "A BOINC megfelelő futásához újraindítás szükséges.\nKérjük, indítsd újra a számítógépet, majd próbáld újra."
 
 #: clientgui/BOINCGUIApp.cpp:402 clientgui/DlgAbout.cpp:153
 msgid "BOINC Manager"
@@ -865,7 +865,7 @@ msgstr "Jelszó"
 
 #: clientgui/BOINCGUIApp.cpp:674
 msgid "Startup BOINC with these optional arguments"
-msgstr "A BOINC indítása a következő opcionális lehetőségekkel"
+msgstr "A BOINC indítása a következő opcionális paraméterekkel"
 
 #: clientgui/BOINCGUIApp.cpp:675
 msgid "disable BOINC security users and permissions"
@@ -885,7 +885,7 @@ msgstr "Nincs használva az XCode 4.2-ben található megoldás a hibára"
 
 #: clientgui/BOINCGUIApp.cpp:681
 msgid "Not run the daemon"
-msgstr "Ne futtassa a daemont"
+msgstr "Ne futtasd a kiszolgálót"
 
 #. These are just special tags so deal with them in a special way
 #: clientgui/BOINCGUIApp.cpp:931
@@ -908,7 +908,7 @@ msgstr "%s megnyitása a Weben..."
 #: clientgui/BOINCTaskBar.cpp:526
 #, c-format
 msgid "Open %s..."
-msgstr "%s megnyitása"
+msgstr "%s megnyitása..."
 
 #: clientgui/BOINCTaskBar.cpp:533 clientgui/BOINCTaskBar.cpp:631
 #: clientgui/BOINCTaskBar.cpp:636
@@ -1002,7 +1002,7 @@ msgstr "Kérjük, próbáld újra később.\n\nKattints a Befejezésre a bezár
 #: clientgui/CompletionErrorPage.cpp:225 clientgui/CompletionPage.cpp:222
 #: clientgui/CompletionPage.cpp:242 clientgui/CompletionPage.cpp:273
 msgid "Click Finish to close."
-msgstr "A bezáráshoz kattintson a Befejez gombra"
+msgstr "A bezáráshoz kattints a Befejez gombra."
 
 #: clientgui/CompletionErrorPage.cpp:234
 msgid "Messages from server:"
@@ -2133,11 +2133,11 @@ msgstr "A BOINC Kezelő elindítása, amikor Ön bejelentkezik."
 
 #: clientgui/DlgOptions.cpp:213
 msgid "Run daemon?"
-msgstr "Daemon fusson?"
+msgstr "Fusson a kiszolgáló?"
 
 #: clientgui/DlgOptions.cpp:219
 msgid "Run daemon when launching the Manager."
-msgstr "Daemon futtatása a kezelő indításakor."
+msgstr "Kiszolgáló futtatása a kezelő indításakor."
 
 #: clientgui/DlgOptions.cpp:223
 msgid "Enable Manager exit dialog?"
diff --git a/locale/it_IT/BOINC-Web.po b/locale/it_IT/BOINC-Web.po
index 13142dc..67aec17 100644
--- a/locale/it_IT/BOINC-Web.po
+++ b/locale/it_IT/BOINC-Web.po
@@ -6,6 +6,7 @@
 # FileID  : $Id$
 # 
 # Translators:
+# Daniele Masini <d.masini.it at gmail.com>, 2016
 # Gianfranco Costamagna <costamagnagianfranco at yahoo.it>, 2015
 # Sebastiano Pistore <olatusrooc at virgilio.it>, 2015-2016
 msgid ""
@@ -13,8 +14,8 @@ msgstr ""
 "Project-Id-Version: BOINC\n"
 "Report-Msgid-Bugs-To: BOINC translation team <boinc_loc at ssl.berkeley.edu>\n"
 "POT-Creation-Date: 2015-07-09 18:59 PDT\n"
-"PO-Revision-Date: 2016-02-09 08:45+0000\n"
-"Last-Translator: Sebastiano Pistore <olatusrooc at virgilio.it>\n"
+"PO-Revision-Date: 2016-02-18 13:16+0000\n"
+"Last-Translator: Daniele Masini <d.masini.it at gmail.com>\n"
 "Language-Team: Italian (Italy) (http://www.transifex.com/boinc/boinc/language/it_IT/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -40,7 +41,7 @@ msgstr "Questa pagina %spuò essere tradotta%s."
 msgid ""
 "We recommend that you also install VirtualBox, so your computer can work on "
 "science projects that require it."
-msgstr "Raccomandiamo l'installazione di VirtualBox perchè alcuni progetti scientifici lo richiedono (ogni progetto che ne ha bisogno lo specifica)."
+msgstr "Raccomandiamo l'installazione di VirtualBox perché alcuni progetti scientifici lo richiedono (ogni progetto che ne ha bisogno lo specifica)."
 
 #: download.php:44
 msgid "Learn more about VirtualBox."
@@ -87,7 +88,7 @@ msgstr "Dopo l'installazione di BOINC sul tuo computer potrai scegliere di aiuta
 msgid ""
 "You may run this software on a computer only if you own the computer or have"
 " the permission of its owner."
-msgstr "Puoi eseguire questo software su un computer solo se possiedi il computer o se hai il permesso del suo proprietario."
+msgstr "Puoi eseguire questo software su un computer solo se se il proprietario del computer o se hai il permesso del suo proprietario."
 
 #: download.php:142
 msgid ""
@@ -139,7 +140,7 @@ msgid ""
 " Skype is free (both the software and the calls).  If you don't already have"
 " Skype, please %sdownload and install it now%s.  When you're finished, "
 "return to this page."
-msgstr "L'assistenza online BOINC si appoggia a %sSkype%s, un sistema di telefonia tramite Internet. Skype è gratis (sia il software che le chiamate).  Se non hai ancora Skype, %sscaricalo ed installalo ora%s.  Quando hai finito ritorna su questa pagina."
+msgstr "L'assistenza online BOINC si appoggia a %sSkype%s, un sistema di telefonia tramite Internet. Skype è gratuito (sia il software che le chiamate).  Se non hai ancora Skype, %sscaricalo ed installalo ora%s.  Quando hai finito ritorna su questa pagina."
 
 #: help.php:28
 msgid ""
@@ -147,17 +148,17 @@ msgid ""
 "microphone and speakers or an external headset for your computer.  You can "
 "also use Skype's text-based chat system or regular email (if you don't have "
 "Skype) to communicate with Help Volunteers."
-msgstr "Il modo migliore di ricevere aiuto è parlando: per ottenerlo è necessario che tu abbia collegati al tuo computer un microfono e delle casse, oppure delle cuffie.  Per comunicare con i volontari dell' assistenza online puoi anche utilizzare la chat testuale di Skype o le email (se non hai Skype)."
+msgstr "Il modo migliore per ricevere aiuto è a voce: per farlo è necessario aver collegato al proprio computer un microfono e delle casse audio, oppure delle cuffie.  Per comunicare con i volontari dell' assistenza online puoi anche utilizzare la chat testuale di Skype o le e-mail (se non hai Skype)."
 
 #: help.php:31
 msgid ""
 "Volunteers speaking several languages are available. Please select a "
 "language:"
-msgstr "Sono disponibili volontari che parlano diverse lingue. Seleziona la lingua in cui vuoi ricevere l'aiuto:"
+msgstr "Sono disponibili volontari che parlano varie lingue. Seleziona la lingua nella quale vuoi ricevere l'aiuto:"
 
 #: help.php:47
 msgid "Be a Help Volunteer"
-msgstr "Diventa un volontario dell'assistenza tecnica"
+msgstr "Diventa un volontario dell'assistenza online"
 
 #: help.php:50
 #, php-format
@@ -177,11 +178,11 @@ msgstr "Se sei già un volontario dell'assistenza online per modificare le tue o
 msgid ""
 "BOINC helpers are unpaid volunteers.  Their advice is not endorsed by BOINC "
 "or the University of California."
-msgstr "Gli aiutanti di BOINC sono volontari non pagati. La loro consulenza non è approvata dal BOINC o dall'Università della California."
+msgstr "Gli aiutanti di BOINC sono volontari a titolo gratuito. La loro consulenza non è sostenuta da BOINC o dall'Università della California."
 
 #: help_funcs.php:139
 msgid "%1Never%2 give email address or password information to BOINC helpers."
-msgstr "Non devi %1MAI%2 fornire l'indirizzo e-mail o la chiave d'accesso ai volontari di BOINC."
+msgstr "Non devi %1MAI%2 fornire il tuo indirizzo e-mail o la tua password ai volontari di BOINC."
 
 #: index.php:24
 msgid "Computing power"
@@ -189,7 +190,7 @@ msgstr "Potenza di calcolo"
 
 #: index.php:26
 msgid "Top 100 volunteers"
-msgstr "I primi 100 volontari"
+msgstr "I migliori 100 volontari"
 
 #: index.php:27
 msgid "Statistics"
@@ -245,7 +246,7 @@ msgid ""
 "Use the idle time on your computer (Windows, Mac, Linux, or Android) to cure"
 " diseases, study global warming, discover pulsars, and do many other types "
 "of scientific research.  It's safe, secure, and easy:"
-msgstr "Usa il tempo libero del tuo computer (Windows, Mac, Linux, o Android) per curare malattie, studiare il riscaldamento globale, scoprire pulsar, e per molti altri tipi di ricerca scientifica.  È innocuo, sicuro e facile:"
+msgstr "Utilizza il tempo libero del tuo computer (Windows, Mac, Linux, o Android) per curare malattie, studiare il riscaldamento globale, scoprire pulsar, e per molti altri tipi di ricerca scientifica.  È innocuo, sicuro e facile:"
 
 #: index.php:103
 msgid "Choose projects"
@@ -888,7 +889,7 @@ msgstr "Decodificare i messaggi dei sommergibili della Seconda guerra mondiale"
 
 #: projects.inc:603
 msgid "Study the Collatz Conjecture, an unsolved conjecture in mathematics"
-msgstr "Studiare la Congettura di Collatz, una congettura matematica irrisolta"
+msgstr "Studiare la congettura di Collatz, una congettura matematica irrisolta"
 
 #: projects.inc:606
 msgid "Study the Collatz Conjecture"
@@ -900,7 +901,7 @@ msgstr "California State University Fullerton"
 
 #: projects.inc:612
 msgid "Factorization of large integers"
-msgstr "Fattorizzazione di grandi numeri interi"
+msgstr "Fattorizzazione di numeri interi grandi"
 
 #: projects.inc:613
 msgid ""
@@ -910,7 +911,7 @@ msgid ""
 "breaking an integer into prime factors, such as 15 = 3 * 5 or 35 = 5 * 7. "
 "NFS at Home is a continuation of that experience, only with integers that are "
 "hundreds of digits long."
-msgstr "NFS at Home è un progetto di ricerca che utilizza computer connessi ad Internet per effettuare l'iterazione del crivello di reticoli (lattice sieving) nella fattorizzazione di grandi interi con il metodo del crivello dei campi di numeri. Da giovane studente, hai fatto la tua prima esperienza di scomporre un intero in fattori primi, ad esempio 15 = 3 * 5 oppure 35 = 5 * 7. NFS at Home è una continuazione di quell'esperienza, solo con interi lunghi centinaia di cifre."
+msgstr "NFS at Home è un progetto di ricerca che utilizza computer connessi ad Internet per effettuare l'iterazione del crivello di reticoli (lattice sieving) nella fattorizzazione di grandi interi con il metodo del crivello dei campi di numeri. Da giovane studente, hai fatto la tua prima esperienza di scomposizione di interi in fattori primi, ad esempio 15 = 3 * 5 oppure 35 = 5 * 7. NFS at Home è una continuazione di quell'esperienza, solo con interi con centinaia di cifre."
 
 #: projects.inc:616
 msgid "Study the factorization of large integers"
diff --git a/locale/zh_TW/BOINC-Manager.po b/locale/zh_TW/BOINC-Manager.po
index 01ca693..7e68364 100644
--- a/locale/zh_TW/BOINC-Manager.po
+++ b/locale/zh_TW/BOINC-Manager.po
@@ -11,7 +11,7 @@ msgstr ""
 "Project-Id-Version: BOINC\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2015-10-16 17:27-0500\n"
-"PO-Revision-Date: 2015-11-26 19:57+0000\n"
+"PO-Revision-Date: 2016-02-16 13:07+0000\n"
 "Last-Translator: Mingye Wang <arthur200126 at gmail.com>\n"
 "Language-Team: Chinese (Taiwan) (http://www.transifex.com/boinc/boinc/language/zh_TW/)\n"
 "MIME-Version: 1.0\n"
diff --git a/sched/edf_sim.h b/sched/edf_sim.h
index b1f7db3..ee80b87 100644
--- a/sched/edf_sim.h
+++ b/sched/edf_sim.h
@@ -37,7 +37,7 @@ struct IP_RESULT {
     double estimated_completion_time;
 
     void init() {
-        strcpy(name, "");
+        safe_strcpy(name, "");
         computation_deadline = 0;
         report_deadline = 0;
         cpu_time_remaining = 0;
diff --git a/version.log b/version.log
index 037da6a..064789f 100644
--- a/version.log
+++ b/version.log
@@ -1 +1 @@
-7.6.24
+7.6.28

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-boinc/boinc.git



More information about the pkg-boinc-commits mailing list