diff --git a/conf.c b/conf.c index e586770..10d891a 100644 --- a/conf.c +++ b/conf.c @@ -194,8 +194,7 @@ conf_setup(struct conf *c, const char *conf_file) if (stat(conf_file, &sb) == -1 || !(sb.st_mode & S_IFREG)) errx(1, "%s: %s", conf_file, strerror(errno)); else - snprintf(c->conf_path, sizeof(c->conf_path), "%s", - conf_file); + strlcpy(c->conf_path, conf_file, sizeof(c->conf_path)); conf_init(c);