swrun_*: Restore buffer overflow prevention code that was removed in da00ba1
diff --git a/agent/mibgroup/host/data_access/swrun_kinfo.c b/agent/mibgroup/host/data_access/swrun_kinfo.c
index fc4ed7a..763d815 100644
--- a/agent/mibgroup/host/data_access/swrun_kinfo.c
+++ b/agent/mibgroup/host/data_access/swrun_kinfo.c
@@ -257,8 +257,8 @@
if (argv)
argv++; /* Skip argv[0] */
while ( argv && *argv ) {
- strcat(buf, " ");
- strcat(buf, *argv);
+ strlcat(buf, " ", sizeof(buf));
+ strlcat(buf, *argv, sizeof(buf));
argv++;
}
if (strlen(buf) >= BUFSIZ-10)