mirror of
https://github.com/php/php-src.git
synced 2024-11-25 02:44:58 +08:00
MFH: Fix expand_filepath when including relative files, ideally you should test you code...
This commit is contained in:
parent
e2b5419e05
commit
52debae82e
@ -621,8 +621,10 @@ PHPAPI char *expand_filepath(const char *filepath, char *real_path TSRMLS_DC)
|
|||||||
copy_len = strlen(filepath) > MAXPATHLEN - 1 ? MAXPATHLEN - 1 : strlen(filepath);
|
copy_len = strlen(filepath) > MAXPATHLEN - 1 ? MAXPATHLEN - 1 : strlen(filepath);
|
||||||
real_path = estrndup(filepath, copy_len);
|
real_path = estrndup(filepath, copy_len);
|
||||||
return real_path;
|
return real_path;
|
||||||
|
} else {
|
||||||
|
cwd[0] = '\0';
|
||||||
}
|
}
|
||||||
} else {
|
} else if (!result) {
|
||||||
cwd[0] = '\0';
|
cwd[0] = '\0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user