summaryrefslogtreecommitdiff
path: root/sbin/fsdb/fsdb.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-17 06:56:05 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-17 06:56:05 +0000
commit9272a29e3986b4b27a23b7dfc928a11d5af6cfe4 (patch)
tree268c1eb3319b3797358495863d38fb2d46f00ffa /sbin/fsdb/fsdb.c
parent4cd6648a36f1b4b79f494afafabd8d0f46ff8163 (diff)
strlcpy; ok tedu
Diffstat (limited to 'sbin/fsdb/fsdb.c')
-rw-r--r--sbin/fsdb/fsdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/fsdb/fsdb.c b/sbin/fsdb/fsdb.c
index 6ca35dc492d..254b00b8679 100644
--- a/sbin/fsdb/fsdb.c
+++ b/sbin/fsdb/fsdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fsdb.c,v 1.11 2002/06/09 08:13:06 todd Exp $ */
+/* $OpenBSD: fsdb.c,v 1.12 2003/04/17 06:56:04 deraadt Exp $ */
/* $NetBSD: fsdb.c,v 1.7 1997/01/11 06:50:53 lukem Exp $ */
/*-
@@ -564,7 +564,7 @@ chnamefunc(idesc)
testdir.d_namlen = strlen(idesc->id_name);
if (DIRSIZ(NEWDIRFMT, &testdir) <= dirp->d_reclen) {
dirp->d_namlen = testdir.d_namlen;
- strcpy(dirp->d_name, idesc->id_name);
+ strlcpy(dirp->d_name, idesc->id_name, sizeof dirp->d_name);
return STOP|ALTERED|FOUND;
} else
return STOP|FOUND; /* won't fit, so give up */