summaryrefslogtreecommitdiff
path: root/usr.sbin/config/misc.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-14 02:59:42 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-14 02:59:42 +0000
commitc0f7498575f310c0d1bbc1e1042e7c60c8ddced0 (patch)
treed558ac13ab46aa7bc11f981b5f08c51ea2c63858 /usr.sbin/config/misc.c
parent6715eae37fa352fa839662463dd316eae343b4de (diff)
kill sprintf
Diffstat (limited to 'usr.sbin/config/misc.c')
-rw-r--r--usr.sbin/config/misc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/config/misc.c b/usr.sbin/config/misc.c
index 316a8fc04cd..d8ba3948988 100644
--- a/usr.sbin/config/misc.c
+++ b/usr.sbin/config/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.1 1999/10/04 20:00:51 deraadt Exp $ */
+/* $OpenBSD: misc.c,v 1.2 2002/07/14 02:59:41 deraadt Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -31,7 +31,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: misc.c,v 1.1 1999/10/04 20:00:51 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: misc.c,v 1.2 2002/07/14 02:59:41 deraadt Exp $";
#endif
#include <sys/types.h>
@@ -59,9 +59,9 @@ ask_cmd(cmd)
buf = &buf[strspn(buf, " \t")];
cp = &buf[strcspn(buf, " \t")];
*cp++ = '\0';
- strncpy(cmd->cmd, buf, 10);
+ strlcpy(cmd->cmd, buf, sizeof cmd->cmd);
buf = &cp[strspn(cp, " \t")];
- strncpy(cmd->args, buf, 100);
+ strlcpy(cmd->args, buf, sizeof cmd->args);
return (0);
}