summaryrefslogtreecommitdiff
path: root/usr.sbin/amd/fsinfo
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2003-04-07 23:45:46 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2003-04-07 23:45:46 +0000
commit4da2438d6e514bb04c72d0a9f8f6b301bb07d16d (patch)
tree34bb2dfb5262626cf484a590e6e9c48398b39e67 /usr.sbin/amd/fsinfo
parentbce4c1db171f856ff2b89e768b57c12faf1aadd3 (diff)
strcpy -> strlcpy. some from and ok deraadt@
Diffstat (limited to 'usr.sbin/amd/fsinfo')
-rw-r--r--usr.sbin/amd/fsinfo/fsi_analyze.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/amd/fsinfo/fsi_analyze.c b/usr.sbin/amd/fsinfo/fsi_analyze.c
index 545eaae7243..c0deb7d0ff9 100644
--- a/usr.sbin/amd/fsinfo/fsi_analyze.c
+++ b/usr.sbin/amd/fsinfo/fsi_analyze.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)fsi_analyze.c 8.1 (Berkeley) 6/6/93
- * $Id: fsi_analyze.c,v 1.3 2002/06/11 05:29:55 itojun Exp $
+ * $Id: fsi_analyze.c,v 1.4 2003/04/07 23:45:45 tedu Exp $
*/
/*
@@ -114,6 +114,7 @@ char *hn;
char *p = strdup(hn);
char *d;
char path[MAXPATHLEN];
+ size_t len = strlen(p) + 1;
domain_strip(p, hostname);
path[0] = '\0';
@@ -131,7 +132,7 @@ char *hn;
log("hostpath of '%s' is '%s'", hn, path);
- strcpy(p, path);
+ strlcpy(p, path, len);
return p;
}