aboutsummaryrefslogtreecommitdiffstats
path: root/controller/ctl-config.c
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-09-26 18:38:57 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:00:25 +0100
commit0ea61ebe60b1be3b33c400bf1a8ebf9cc6644349 (patch)
tree48645f3073c2bdc2a18de2a1d2c9ff4123302ea6 /controller/ctl-config.c
parent6b492d666ed1faeeec5f761105f473956b426cc9 (diff)
Better use of strncat
Change-Id: I89a1ab96280f7502b0e2f21adc30652b96f82932 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'controller/ctl-config.c')
-rw-r--r--controller/ctl-config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/controller/ctl-config.c b/controller/ctl-config.c
index 580c68c..fe76c90 100644
--- a/controller/ctl-config.c
+++ b/controller/ctl-config.c
@@ -57,8 +57,8 @@ char* CtlConfigSearch(const char *dirList, const char* fileName) {
if (strcasestr(filename, controlFile)) {
char filepath[CONTROL_MAXPATH_LEN];
strncpy(filepath, fullpath, sizeof (filepath));
- strncat(filepath, "/", sizeof (filepath));
- strncat(filepath, filename, sizeof (filepath));
+ strncat(filepath, "/", strlen("/"));
+ strncat(filepath, filename, strlen(filename));
return (strdup(filepath));
}
}