diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-05-29 18:39:01 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-05-29 18:39:01 +0000 |
commit | da4b035c00c91f83f53006859ff51cc6316c59fd (patch) | |
tree | 5b71ada85fe1e39d042db8b6a28ab5ba06a71408 /usr.sbin/amd | |
parent | 8852a4e96620349bdbb8b1910914433eb4ae5b23 (diff) |
more strlcat and strlcpy
Diffstat (limited to 'usr.sbin/amd')
-rw-r--r-- | usr.sbin/amd/amd/amd.c | 4 | ||||
-rw-r--r-- | usr.sbin/amd/amd/mapc.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/amd/amd/amd.c b/usr.sbin/amd/amd/amd.c index 9c4e49d054d..52b4a39d446 100644 --- a/usr.sbin/amd/amd/amd.c +++ b/usr.sbin/amd/amd/amd.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)amd.c 8.1 (Berkeley) 6/6/93 - * $Id: amd.c,v 1.5 2002/05/26 02:49:50 deraadt Exp $ + * $Id: amd.c,v 1.6 2002/05/29 18:39:00 deraadt Exp $ */ #ifndef lint @@ -245,7 +245,7 @@ char *argv[]; *domdot++ = '\0'; hostdomain = domdot; } - strcpy(hostd, hostname); + strlcpy(hostd, hostname, sizeof hostd); /* * Trap interrupts for shutdowns. diff --git a/usr.sbin/amd/amd/mapc.c b/usr.sbin/amd/amd/mapc.c index becc6d1a922..aeeb4a360a6 100644 --- a/usr.sbin/amd/amd/mapc.c +++ b/usr.sbin/amd/amd/mapc.c @@ -38,7 +38,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)mapc.c 8.1 (Berkeley) 6/6/93";*/ -static char *rcsid = "$Id: mapc.c,v 1.2 2001/03/02 06:22:03 deraadt Exp $"; +static char *rcsid = "$Id: mapc.c,v 1.3 2002/05/29 18:39:00 deraadt Exp $"; #endif /* not lint */ /* @@ -705,7 +705,7 @@ int recurse; * For example: * "src/gnu/gcc" -> "src / gnu / *" -> "src / *" */ - strcpy(wildname, key); + strlcpy(wildname, key, sizeof wildname); while (error && (subp = strrchr(wildname, '/'))) { strcpy(subp, "/*"); #ifdef DEBUG |