From 8a542f13a85f6cc80399ed6d180055ab9034eb6c Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Wed, 5 Jun 2013 12:11:20 -0400 Subject: [PATCH] API: Change some strcat's to strlcats --- api/boinc_api.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/boinc_api.cpp b/api/boinc_api.cpp index 9baf4c0825..5cb367e902 100644 --- a/api/boinc_api.cpp +++ b/api/boinc_api.cpp @@ -336,21 +336,21 @@ static bool update_app_progress(double cpu_t, double cp_cpu_t) { cpu_t, cp_cpu_t ); if (want_network) { - strlcat(msg_buf, "1\n", MSG_CHANNEL_SIZE); + strlcat(msg_buf, "1\n", sizeof(msg_buf)); } if (fraction_done >= 0) { double range = aid.fraction_done_end - aid.fraction_done_start; double fdone = aid.fraction_done_start + fraction_done*range; sprintf(buf, "%e\n", fdone); - strlcat(msg_buf, buf, MSG_CHANNEL_SIZE); + strlcat(msg_buf, buf, sizeof(msg_buf)); } if (bytes_sent) { sprintf(buf, "%f\n", bytes_sent); - strcat(msg_buf, buf); + strlcat(msg_buf, buf, sizeof(msg_buf)); } if (bytes_received) { sprintf(buf, "%f\n", bytes_received); - strcat(msg_buf, buf); + strlcat(msg_buf, buf, sizeof(msg_buf)); } return app_client_shm->shm->app_status.send_msg(msg_buf); }