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);
}