mirror of
https://github.com/php/php-src.git
synced 2026-04-25 17:08:14 +02:00
- use php_sys_readlink
This commit is contained in:
@@ -1006,7 +1006,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
|
||||
memcpy(tmp, path, len+1);
|
||||
|
||||
if (save && S_ISLNK(st.st_mode)) {
|
||||
if (++(*ll) > LINK_MAX || (j = readlink(tmp, path, MAXPATHLEN)) < 0) {
|
||||
if (++(*ll) > LINK_MAX || (j = php_sys_readlink(tmp, path, MAXPATHLEN)) < 0) {
|
||||
/* too many links or broken symlinks */
|
||||
tsrm_free_alloca(tmp, use_heap);
|
||||
return -1;
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ PHP_FUNCTION(readlink)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
ret = readlink(link, buff, MAXPATHLEN-1);
|
||||
ret = php_sys_readlink(link, buff, MAXPATHLEN-1);
|
||||
|
||||
if (ret == -1) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno));
|
||||
|
||||
Reference in New Issue
Block a user