fix another misuse of strncat
This has the potential to overflow "buffer" if the command line
is more than 4K.
Change-Id: Icdfed0d9d21804f290b75787ef3809e0475b14f0
diff --git a/toolbox/log.c b/toolbox/log.c
index f30e6a7..0bee19e 100644
--- a/toolbox/log.c
+++ b/toolbox/log.c
@@ -130,8 +130,8 @@
buffer[0] = '\0';
for (i = optind ; i < argc ; i++) {
- strncat(buffer, argv[i], sizeof(buffer)-1);
- strncat(buffer, " ", sizeof(buffer)-1);
+ strlcat(buffer, argv[i], sizeof(buffer)-1);
+ strlcat(buffer, " ", sizeof(buffer)-1);
}
if(buffer[0] == 0) {