From 8be175b175f04c4c16ec4be63bab6b1d2b0ebbfd Mon Sep 17 00:00:00 2001 From: okan Date: Fri, 11 Jul 2008 14:24:34 +0000 Subject: [PATCH] replace snprintf with strlcpy ok oga@ --- conf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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);