#include "include/strlcpy.h"
#endif
+#ifndef HAVE_STRLCAT
+#include "include/strlcat.h"
+#endif
+
lxc_log_define(lxc_cgfsng, lxc);
static void free_string_list(char **clist)
if (h->controllers[0] == *it)
add_controllers[0] = '\0';
- strncat(add_controllers, "+", 1);
- strncat(add_controllers, *it, strlen(*it));
+ (void)strlcat(add_controllers, "+", full_len + 1);
+ (void)strlcat(add_controllers, *it, full_len + 1);
if ((it + 1) && *(it + 1))
- strncat(add_controllers, " ", 1);
+ (void)strlcat(add_controllers, " ", full_len + 1);
}
parts = lxc_string_split(cgname, '/');
if (ret < 0 && errno != EEXIST)
goto on_error;
- strncat(full_path, "/cgroup.procs", strlen("/cgroup.procs"));
+ (void)strlcat(full_path, "/cgroup.procs", len + 1);
ret = lxc_write_to_file(full_path, pidstr, len, false, 0666);
if (ret == 0)
goto on_success;