summaryrefslogtreecommitdiff
path: root/sbin/badsect/badsect.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-03-13 05:00:46 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-03-13 05:00:46 +0000
commitcb6e8175ac10701d65b5fec5e46d51be5bf0c9df (patch)
tree80b99f1a91fa55eb600bdf0ea73fddddbb4d17d7 /sbin/badsect/badsect.c
parentda8bb9c6524889ac263619304fb47655a50b836a (diff)
more strlcpy; most from Hans-Joerg.Hoexer@yerbouti.franken.de, a bit from me
Diffstat (limited to 'sbin/badsect/badsect.c')
-rw-r--r--sbin/badsect/badsect.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/badsect/badsect.c b/sbin/badsect/badsect.c
index a85d45cb586..8262e54d9d5 100644
--- a/sbin/badsect/badsect.c
+++ b/sbin/badsect/badsect.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: badsect.c,v 1.9 2002/07/03 22:32:32 deraadt Exp $ */
+/* $OpenBSD: badsect.c,v 1.10 2003/03/13 05:00:41 deraadt Exp $ */
/* $NetBSD: badsect.c,v 1.10 1995/03/18 14:54:28 cgd Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)badsect.c 8.1 (Berkeley) 6/5/93";
#else
-static char rcsid[] = "$OpenBSD: badsect.c,v 1.9 2002/07/03 22:32:32 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: badsect.c,v 1.10 2003/03/13 05:00:41 deraadt Exp $";
#endif
#endif /* not lint */
@@ -110,7 +110,7 @@ main(int argc, char *argv[])
perror(argv[1]);
exit(2);
}
- strcpy(name, _PATH_DEV);
+ strlcpy(name, _PATH_DEV, sizeof name);
len = strlen(name);
if ((dirp = opendir(name)) == NULL) {
perror(name);