summaryrefslogtreecommitdiff
path: root/usr.bin/make
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2003-06-25 13:40:28 +0000
committerMarc Espie <espie@cvs.openbsd.org>2003-06-25 13:40:28 +0000
commit06e36328b70575957965fd86fa3be7c5fcbe9246 (patch)
treef54fca35a744ef30704208e011b99042a80ad858 /usr.bin/make
parentd4f9325edcee28dbf45bcad0c91a20f8d0ba0dd3 (diff)
kill unused strcpy. Let the preprocessor compute the right size, as suggested
by miod and ok miod@
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/make/util.c b/usr.bin/make/util.c
index b3aa794341f..4efbef728fb 100644
--- a/usr.bin/make/util.c
+++ b/usr.bin/make/util.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: util.c,v 1.19 2003/04/06 22:47:14 espie Exp $ */
+/* $OpenBSD: util.c,v 1.20 2003/06/25 13:40:27 espie Exp $ */
/* $NetBSD: util.c,v 1.10 1996/12/31 17:56:04 christos Exp $ */
/*
@@ -263,7 +263,8 @@ getwd(pathname)
for (d = readdir(dp); d != NULL; d = readdir(dp)) {
if (ISDOT(d->d_name) || ISDOTDOT(d->d_name))
continue;
- (void)strcpy(cur_name_add, d->d_name);
+ (void)strlcpy(cur_name_add, d->d_name,
+ 2 * MAXPATHLEN - (MAXPATHLEN - 1));
if (lstat(nextpathptr, &st_next) == -1) {
(void)snprintf(pathname, MAXPATHLEN,
"getwd: Cannot stat \"%s\" (%s)",