summaryrefslogtreecommitdiff
path: root/app/cwm
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2008-07-11 14:24:35 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2008-07-11 14:24:35 +0000
commit8540d0c2ad16edb06fa7ae64b59ca6036c79fda8 (patch)
treefa4d85a4c185f1d5c5b28122599308d3ce406bd1 /app/cwm
parentf2e294b1509d817c713729da3551a7e749500fa9 (diff)
replace snprintf with strlcpy
ok oga@
Diffstat (limited to 'app/cwm')
-rw-r--r--app/cwm/conf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/cwm/conf.c b/app/cwm/conf.c
index 88609544f..6be7b5a2f 100644
--- a/app/cwm/conf.c
+++ b/app/cwm/conf.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: conf.c,v 1.47 2008/07/11 14:21:28 okan Exp $
+ * $Id: conf.c,v 1.48 2008/07/11 14:24:34 okan Exp $
*/
#include "headers.h"
@@ -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);