diff options
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));  		}  	}  | 
