/php-src/win32/ |
H A D | registry.c | 147 if (path_len) { in LoadDirectory() 152 name_len += path_len+1; in LoadDirectory() 183 int path_len; in UpdateIniFromRegistry() local 250 path_len = 0; in UpdateIniFromRegistry() 251 while (path[path_len] != 0) { in UpdateIniFromRegistry() 253 path[path_len] = '/'; in UpdateIniFromRegistry() 255 path_len++; in UpdateIniFromRegistry() 259 while (path_len > 0) { in UpdateIniFromRegistry() 272 path_len--; in UpdateIniFromRegistry() 273 } while (path_len > 0 && path[path_len] != '/'); in UpdateIniFromRegistry() [all …]
|
H A D | ioutil.c | 284 size_t path_len, dir_len = 0; in php_win32_ioutil_mkdir_w() local 294 path_len = wcslen(path); in php_win32_ioutil_mkdir_w() 296 …_IS_ABSOLUTEW(path, path_len) && !PHP_WIN32_IOUTIL_IS_JUNCTION_PATHW(path, path_len) && !PHP_WIN32… in php_win32_ioutil_mkdir_w() 304 if (dir_len + path_len < _MAX_PATH && dir_len + path_len >= _MAX_PATH - 12) { in php_win32_ioutil_mkdir_w() 314 wchar_t *tmp = (wchar_t *) malloc((path_len + 1) * sizeof(wchar_t)); in php_win32_ioutil_mkdir_w() 319 memmove(tmp, path, (path_len + 1) * sizeof(wchar_t)); in php_win32_ioutil_mkdir_w() 321 if (PHP_WIN32_IOUTIL_NORM_FAIL == php_win32_ioutil_normalize_path_w(&tmp, path_len, &path_len)) { in php_win32_ioutil_mkdir_w() 326 if (!PHP_WIN32_IOUTIL_IS_LONG_PATHW(tmp, path_len)) { in php_win32_ioutil_mkdir_w() 349 while (src < tmp + path_len) { in php_win32_ioutil_mkdir_w() 357 path_len += PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW + dir_len; in php_win32_ioutil_mkdir_w() [all …]
|
H A D | winutil.h | 31 int php_win32_check_trailing_space(const char * path, const size_t path_len);
|
H A D | winutil.c | 57 int php_win32_check_trailing_space(const char * path, const size_t path_len) in php_win32_check_trailing_space() argument 59 if (path_len > MAXPATHLEN - 1) { in php_win32_check_trailing_space() 63 if (path[0] == ' ' || path[path_len - 1] == ' ') { in php_win32_check_trailing_space()
|
/php-src/ext/ftp/ |
H A D | ftp.h | 154 char** ftp_nlist(ftpbuf_t *ftp, const char *path, const size_t path_len); 161 char** ftp_list(ftpbuf_t *ftp, const char *path, const size_t path_len, int recursive); 173 char** ftp_mlsd(ftpbuf_t *ftp, const char *path, const size_t path_len); 183 int ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, const size_t path_len, ftptype… 188 int ftp_put(ftpbuf_t *ftp, const char *path, const size_t path_len, php_stream *instream, ftptype_… 193 int ftp_append(ftpbuf_t *ftp, const char *path, const size_t path_len, php_stream *instream, ftpty… 196 zend_long ftp_size(ftpbuf_t *ftp, const char *path, const size_t path_len); 199 time_t ftp_mdtm(ftpbuf_t *ftp, const char *path, const size_t path_len); 205 int ftp_delete(ftpbuf_t *ftp, const char *path, const size_t path_len); 213 int ftp_nb_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, const size_t path_len, ftpt… [all …]
|
H A D | ftp.c | 694 ftp_nlist(ftpbuf_t *ftp, const char *path, const size_t path_len) in ftp_nlist() argument 696 return ftp_genlist(ftp, "NLST", sizeof("NLST")-1, path, path_len); in ftp_nlist() 710 ftp_mlsd(ftpbuf_t *ftp, const char *path, const size_t path_len) in ftp_mlsd() argument 917 if (!ftp_putcmd(ftp, "RETR", sizeof("RETR")-1, path, path_len)) { in ftp_get() 1081 if (!ftp_putcmd(ftp, "STOR", sizeof("STOR")-1, path, path_len)) { in ftp_put() 1125 if (!ftp_putcmd(ftp, "APPE", sizeof("APPE")-1, path, path_len)) { in ftp_append() 1153 ftp_size(ftpbuf_t *ftp, const char *path, const size_t path_len) in ftp_size() argument 1161 if (!ftp_putcmd(ftp, "SIZE", sizeof("SIZE")-1, path, path_len)) { in ftp_size() 1173 ftp_mdtm(ftpbuf_t *ftp, const char *path, const size_t path_len) in ftp_mdtm() argument 1184 if (!ftp_putcmd(ftp, "MDTM", sizeof("MDTM")-1, path, path_len)) { in ftp_mdtm() [all …]
|
/php-src/ext/zip/ |
H A D | zip_stream.c | 125 size_t path_len = strlen(stream->orig_path); in php_zip_ops_stat() local 148 path_len = strlen(path); in php_zip_ops_stat() 149 if (path_len >= MAXPATHLEN) { in php_zip_ops_stat() 153 memcpy(file_dirname, path, path_len - fragment_len); in php_zip_ops_stat() 154 file_dirname[path_len - fragment_len] = '\0'; in php_zip_ops_stat() 174 if (path[path_len-1] != '/') { in php_zip_ops_stat() 282 size_t path_len; in php_stream_zip_opener() local 310 path_len = strlen(path); in php_stream_zip_opener() 311 if (path_len >= MAXPATHLEN || mode[0] != 'r') { in php_stream_zip_opener() 315 memcpy(file_dirname, path, path_len - fragment_len); in php_stream_zip_opener() [all …]
|
H A D | php_zip.c | 57 #define PHP_ZIP_STAT_PATH(za, path, path_len, flags, sb) \ argument 58 if (path_len == 0) { \ 89 if (path_len < 1 || path == NULL) { in php_zip_make_relative_path() 93 if (IS_ABSOLUTE_PATH(path, path_len)) { in php_zip_make_relative_path() 97 i = path_len; in php_zip_make_relative_path() 734 if (!IS_ABSOLUTE_PATH(path, path_len)) { in php_zip_pcre() 781 if ((path_len + namelist_len + 1) >= MAXPATHLEN) { in php_zip_pcre() 783 MAXPATHLEN - 1, (path_len + namelist_len + 1)); in php_zip_pcre() 1735 size_t path_len = 1; local 1750 &pattern, &path, &path_len, &options) == FAILURE) { [all …]
|
/php-src/main/ |
H A D | fopen_wrappers.c | 151 size_t path_len; local 160 path_len = strlen(path); 171 path_len = strlen(resolved_name); 205 if (path_len > 1 && path_tmp[path_len - 2] == ':') { 206 if (path_len != 3) { 210 path_tmp[path_len] = '\0'; 212 path_tmp[path_len - 1] = '\0'; 215 path_tmp[path_len - 1] = '\0'; 786 size_t path_len; local 792 path_len = strlen(filepath); [all …]
|
H A D | php_ini.c | 822 PHPAPI void php_ini_activate_per_dir_config(char *path, size_t path_len) argument 833 if (path_len >= MAXPATHLEN) { 835 if (path_len > MAXPATHLEN) { 841 memcpy(path_bak, path, path_len); 842 path_bak[path_len] = 0; 848 if (has_per_dir_config && path && path_len) {
|
H A D | php_ini.h | 36 PHPAPI void php_ini_activate_per_dir_config(char *path, size_t path_len);
|
/php-src/ext/phar/ |
H A D | util.c | 212 entry.filename_len = path_len; in phar_mount_entry() 503 if (!path_len) { in phar_get_entry_data() 645 is_dir = (path_len && path[path_len - 1] == '/') ? 1 : 0; in phar_get_or_create_entry_data() 676 etemp.filename_len = path_len; in phar_get_or_create_entry_data() 696 if (is_dir && path_len) { in phar_get_or_create_entry_data() 698 path_len--; in phar_get_or_create_entry_data() 1264 is_dir = (path_len && (path[path_len - 1] == '/')) ? 1 : 0; in phar_get_entry_info_dir() 1277 if (!path_len && !dir) { in phar_get_entry_info_dir() 1296 if (path_len <= 1) { in phar_get_entry_info_dir() 1299 path_len--; in phar_get_entry_info_dir() [all …]
|
H A D | phar_internal.h | 363 static inline void phar_unixify_path_separators(char *path, size_t path_len) in BEGIN_EXTERN_C() 368 for (s = path; (size_t)(s - path) < path_len; ++s) { in BEGIN_EXTERN_C() 425 …t_entry(phar_archive_data *phar, char *filename, size_t filename_len, char *path, size_t path_len); 467 phar_entry_info *phar_get_entry_info(phar_archive_data *phar, char *path, size_t path_len, char **e… 468 phar_entry_info *phar_get_entry_info_dir(phar_archive_data *phar, char *path, size_t path_len, char… 469 …_or_create_entry_data(char *fname, size_t fname_len, char *path, size_t path_len, const char *mode… 470 …har_entry_data **ret, char *fname, size_t fname_len, char *path, size_t path_len, const char *mode…
|
H A D | dirstream.c | 527 size_t path_len = ZSTR_LEN(resource->path) - 1; in phar_wrapper_rmdir() local 529 …if (!(entry = phar_get_entry_info_dir(phar, ZSTR_VAL(resource->path) + 1, path_len, 2, &error, 1))… in phar_wrapper_rmdir() 545 zend_string_starts_with_cstr(str_key, ZSTR_VAL(resource->path)+1, path_len) in phar_wrapper_rmdir() 546 && IS_SLASH(ZSTR_VAL(str_key)[path_len]) in phar_wrapper_rmdir() 561 zend_string_starts_with_cstr(str_key, ZSTR_VAL(resource->path)+1, path_len) in phar_wrapper_rmdir() 562 && IS_SLASH(ZSTR_VAL(str_key)[path_len]) in phar_wrapper_rmdir() 576 zend_hash_str_del(&phar->virtual_dirs, ZSTR_VAL(resource->path)+1, path_len); in phar_wrapper_rmdir()
|
/php-src/sapi/litespeed/ |
H A D | lsapi_main.c | 544 size_t path_len, server_name_len; in sapi_lsapi_activate() local 569 path = emalloc(path_len + 2); in sapi_lsapi_activate() 571 path_len = zend_dirname(path, path_len); in sapi_lsapi_activate() 572 path[path_len++] = DEFAULT_SLASH; in sapi_lsapi_activate() 575 path_len = zend_dirname(path, path_len); in sapi_lsapi_activate() 577 path[path_len] = 0; in sapi_lsapi_activate() 904 uint32_t path_len; member 946 ctx->path_len = strlen(ctx->path); in lsapi_activate_user_ini_mk_path() 948 ctx->path_len = zend_dirname(path, ctx->path_len); in lsapi_activate_user_ini_mk_path() 971 ctx->path_len = strlen(ctx->path); in lsapi_activate_user_ini_mk_realpath() [all …]
|
/php-src/Zend/ |
H A D | zend_virtual_cwd.c | 343 const char *e = path + path_len; in realpath_cache_key() 368 if (key == (*bucket)->key && path_len == (*bucket)->path_len && in realpath_cache_del() 369 memcmp(path, (*bucket)->path, path_len) == 0) { in realpath_cache_del() 394 if (realpath_len != path_len || in realpath_cache_add() 395 memcmp(path, realpath, path_len) != 0) { in realpath_cache_add() 408 bucket->key = realpath_cache_key(path, path_len); in realpath_cache_add() 410 memcpy(bucket->path, path, path_len+1); in realpath_cache_add() 411 bucket->path_len = path_len; in realpath_cache_add() 415 bucket->realpath = bucket->path + (path_len + 1); in realpath_cache_add() 453 } else if (key == (*bucket)->key && path_len == (*bucket)->path_len && in realpath_cache_find() [all …]
|
H A D | zend_virtual_cwd.h | 227 uint16_t path_len; member 256 CWD_API void realpath_cache_del(const char *path, size_t path_len); 257 CWD_API realpath_cache_bucket* realpath_cache_lookup(const char *path, size_t path_len, time_t t);
|
/php-src/sapi/fpm/fpm/ |
H A D | fpm_php.c | 249 size_t path_len; in fpm_php_limit_extensions() local 256 path_len = strlen(path); in fpm_php_limit_extensions() 259 if (path_len > ext_len) { in fpm_php_limit_extensions() 260 char *path_ext = path + path_len - ext_len; in fpm_php_limit_extensions()
|
H A D | fpm_main.c | 660 if (!IS_ABSOLUTE_PATH(path, path_len)) { in php_cgi_ini_activate_user_config() 667 path_len = real_path_len; in php_cgi_ini_activate_user_config() 670 if (path_len > doc_root_len) { in php_cgi_ini_activate_user_config() 677 s_len = path_len; in php_cgi_ini_activate_user_config() 708 uint32_t path_len, doc_root_len, server_name_len; in sapi_cgi_activate() local 732 path_len = strlen(SG(request_info).path_translated); in sapi_cgi_activate() 736 path = emalloc(path_len + 2); in sapi_cgi_activate() 738 path_len = zend_dirname(path, path_len); in sapi_cgi_activate() 739 path[path_len++] = DEFAULT_SLASH; in sapi_cgi_activate() 742 path_len = zend_dirname(path, path_len); in sapi_cgi_activate() [all …]
|
/php-src/main/streams/ |
H A D | glob_wrapper.c | 41 size_t path_len; member 55 *plen = pglob->path_len; in _php_glob_stream_get_path() 130 pglob->path_len = path - gpath; in php_glob_stream_path_split() 131 pglob->path = estrndup(gpath, pglob->path_len); in php_glob_stream_path_split()
|
/php-src/sapi/cgi/ |
H A D | cgi_main.c | 807 if (!IS_ABSOLUTE_PATH(path, path_len)) { 815 path_len = real_path_len; 818 if (path_len > doc_root_len) { 825 s_len = path_len; 895 size_t path_len; local 898 path_len = strlen(SG(request_info).path_translated); 902 path = emalloc(path_len + 2); 904 path_len = zend_dirname(path, path_len); 905 path[path_len++] = DEFAULT_SLASH; 908 path_len = zend_dirname(path, path_len); [all …]
|
/php-src/ext/spl/ |
H A D | spl_directory.c | 447 size_t path_len; in spl_filesystem_info_set_filename() local 454 if (path_len > 1 && IS_SLASH_AT(ZSTR_VAL(path), path_len-1)) { in spl_filesystem_info_set_filename() 456 path_len--; in spl_filesystem_info_set_filename() 462 while (path_len > 1 && !IS_SLASH_AT(ZSTR_VAL(path), path_len-1)) { in spl_filesystem_info_set_filename() 463 path_len--; in spl_filesystem_info_set_filename() 465 if (path_len) { in spl_filesystem_info_set_filename() 466 path_len--; in spl_filesystem_info_set_filename() 2058 path_len--; in PHP_METHOD() 2062 path_len--; in PHP_METHOD() 2065 if (path_len) { in PHP_METHOD() [all …]
|
/php-src/sapi/phpdbg/ |
H A D | phpdbg_bp.h | 126 PHPDBG_API void phpdbg_set_breakpoint_file(const char* filename, size_t path_len, zend_ulong lineno…
|
H A D | phpdbg_bp.c | 256 PHPDBG_API void phpdbg_set_breakpoint_file(const char *path, size_t path_len, zend_ulong line_num) … in phpdbg_set_breakpoint_file() argument 267 if (!path_len) { in phpdbg_set_breakpoint_file() 272 path_len = strlen(path); in phpdbg_set_breakpoint_file() 274 …mpiled: %d\n", original_path, path, zend_hash_str_exists(&PHPDBG_G(file_sources), path, path_len)); in phpdbg_set_breakpoint_file() 276 if (!zend_hash_str_exists(&PHPDBG_G(file_sources), path, path_len)) { in phpdbg_set_breakpoint_file() 285 path_len = strlen(path); in phpdbg_set_breakpoint_file() 295 path_str = zend_string_init(path, path_len, 0); in phpdbg_set_breakpoint_file() 306 new_break.filename = estrndup(path, path_len); in phpdbg_set_breakpoint_file()
|
/php-src/ext/standard/ |
H A D | filestat.c | 171 size_t path_len; in PHP_FUNCTION() local 174 Z_PARAM_PATH(path, path_len) in PHP_FUNCTION() 253 size_t path_len; in PHP_FUNCTION() local 256 Z_PARAM_PATH(path, path_len) in PHP_FUNCTION() 1126 zend_hash_str_update(Z_ARRVAL_P(return_value), bucket->path, bucket->path_len, &entry); in PHP_FUNCTION()
|