diff options
| author | Jacques Vidrine <nectar@FreeBSD.org> | 2003-04-29 21:13:50 +0000 | 
|---|---|---|
| committer | Jacques Vidrine <nectar@FreeBSD.org> | 2003-04-29 21:13:50 +0000 | 
| commit | 5723e501abb675701352eb3e9fd58bb3cc2c649d (patch) | |
| tree | e9749f1ff2693755bce73e10528fc8cc6a6563ea /lib/libc/stdlib/realpath.c | |
| parent | a8b5a9cd120e319cacf1c68e4a257e6955e0d5d6 (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdlib/realpath.c')
| -rw-r--r-- | lib/libc/stdlib/realpath.c | 12 | 
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libc/stdlib/realpath.c b/lib/libc/stdlib/realpath.c index c2694717a9e8..93a98561fc21 100644 --- a/lib/libc/stdlib/realpath.c +++ b/lib/libc/stdlib/realpath.c @@ -67,14 +67,14 @@ realpath(const char *path, char resolved[PATH_MAX])  		if (path[1] == '\0')  			return (resolved);  		resolved_len = 1; -		left_len = strlcpy(left, path + 1, sizeof(left)); +		left_len = _strlcpy(left, path + 1, sizeof(left));  	} else {  		if (getcwd(resolved, PATH_MAX) == NULL) { -			strlcpy(resolved, ".", PATH_MAX); +			_strlcpy(resolved, ".", PATH_MAX);  			return (NULL);  		}  		resolved_len = strlen(resolved); -		left_len = strlcpy(left, path, sizeof(left)); +		left_len = _strlcpy(left, path, sizeof(left));  	}  	if (left_len >= sizeof(left) || resolved_len >= PATH_MAX) {  		errno = ENAMETOOLONG; @@ -131,7 +131,7 @@ realpath(const char *path, char resolved[PATH_MAX])  		 * lstat() fails we still can return successfully if  		 * there are no more path components left.  		 */ -		resolved_len = strlcat(resolved, next_token, PATH_MAX); +		resolved_len = _strlcat(resolved, next_token, PATH_MAX);  		if (resolved_len >= PATH_MAX) {  			errno = ENAMETOOLONG;  			return (NULL); @@ -177,13 +177,13 @@ realpath(const char *path, char resolved[PATH_MAX])  					symlink[slen] = '/';  					symlink[slen + 1] = 0;  				} -				left_len = strlcat(symlink, left, sizeof(left)); +				left_len = _strlcat(symlink, left, sizeof(left));  				if (left_len >= sizeof(left)) {  					errno = ENAMETOOLONG;  					return (NULL);  				}  			} -			left_len = strlcpy(left, symlink, sizeof(left)); +			left_len = _strlcpy(left, symlink, sizeof(left));  		}  	}  | 
