diff options
author | imp <imp@FreeBSD.org> | 2001-05-16 19:10:40 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2001-05-16 19:10:40 +0000 |
commit | d3f66389ff16a4744bbf881cad06556b1b9830fe (patch) | |
tree | b04dfa3212484d6d0559a8715c17cf27319f27bb /bin/cp/utils.c | |
parent | e2fa665e9f1748f3f8e15f524f6d7fb542e66b37 (diff) | |
download | FreeBSD-src-d3f66389ff16a4744bbf881cad06556b1b9830fe.zip FreeBSD-src-d3f66389ff16a4744bbf881cad06556b1b9830fe.tar.gz |
Migrate from using MAXPATHLEN to MAX_PATH. Use strlcpy to copy the
strings.
Diffstat (limited to 'bin/cp/utils.c')
-rw-r--r-- | bin/cp/utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/cp/utils.c b/bin/cp/utils.c index 34b0225..110cc79 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -50,6 +50,7 @@ static const char rcsid[] = #include <errno.h> #include <fcntl.h> #include <fts.h> +#include <limits.h> #include <stdio.h> #include <sysexits.h> #include <unistd.h> @@ -209,7 +210,7 @@ copy_link(p, exists) int exists; { int len; - char link[MAXPATHLEN]; + char link[PATH_MAX]; if ((len = readlink(p->fts_path, link, sizeof(link) - 1)) == -1) { warn("readlink: %s", p->fts_path); |