/PHP-8.3/ext/fileinfo/libmagic/ |
H A D | fsmagic.c | 100 ret = php_sys_stat(fn, sb); in file_fsmagic() 116 if (sb->st_mode & S_ISUID) in file_fsmagic() 121 if (sb->st_mode & S_ISGID) in file_fsmagic() 126 if (sb->st_mode & S_ISVTX) in file_fsmagic() 132 switch (sb->st_mode & S_IFMT) { in file_fsmagic() 152 COMMA, major(sb->st_rdev), dv_unit(sb->st_rdev), in file_fsmagic() 153 dv_subunit(sb->st_rdev)) == -1) in file_fsmagic() 157 COMMA, (long)major(sb->st_rdev), in file_fsmagic() 158 (long)minor(sb->st_rdev)) == -1) in file_fsmagic() 227 if ((ms->flags & MAGIC_DEVICES) == 0 && sb->st_size == 0) { in file_fsmagic() [all …]
|
H A D | magic.c | 200 zend_stat_t sb = {0}; in file_or_stream() local 215 switch (file_fsmagic(ms, inname, &sb)) { in file_or_stream() 231 if (unreadable_info(ms, sb.st_mode, inname) == -1) in file_or_stream() 246 memcpy(&sb, &ssb.sb, sizeof(zend_stat_t)); in file_or_stream() 257 if (file_buffer(ms, stream, &sb, inname, buf, CAST(size_t, nbytes)) == -1) in file_or_stream()
|
H A D | apprentice.c | 1083 size_t sb = apprentice_magic_strength(mb->mp, mb->cont_count); in apprentice_sort() local 1084 if (sa == sb) in apprentice_sort() 1086 else if (sa > sb) in apprentice_sort() 3216 if (st.sb.st_mode & S_IFDIR) { in apprentice_map() 3238 if (st.sb.st_size < 8 || st.sb.st_size > maxoff_t()) { in apprentice_map() 3240 st.sb.st_size < 8 ? "small" : "large"); in apprentice_map() 3245 map->len = CAST(size_t, st.sb.st_size); in apprentice_map() 3248 if (php_stream_read(stream, map->p, (size_t)st.sb.st_size) != (size_t)st.sb.st_size) { in apprentice_map() 3286 nentries = (uint32_t)(st.sb.st_size / sizeof(struct magic)); in apprentice_map() 3287 entries = (uint32_t)(st.sb.st_size / sizeof(struct magic)); in apprentice_map() [all …]
|
/PHP-8.3/ext/zip/ |
H A D | zip_stream.c | 125 struct zip_stat sb; in php_zip_ops_stat() local 177 ssb->sb.st_size = sb.size; in php_zip_ops_stat() 180 ssb->sb.st_size = 0; in php_zip_ops_stat() 184 ssb->sb.st_mtime = sb.mtime; in php_zip_ops_stat() 185 ssb->sb.st_atime = sb.mtime; in php_zip_ops_stat() 186 ssb->sb.st_ctime = sb.mtime; in php_zip_ops_stat() 187 ssb->sb.st_nlink = 1; in php_zip_ops_stat() 188 ssb->sb.st_rdev = -1; in php_zip_ops_stat() 190 ssb->sb.st_blksize = -1; in php_zip_ops_stat() 191 ssb->sb.st_blocks = -1; in php_zip_ops_stat() [all …]
|
H A D | php_zip.c | 129 struct zip_stat sb; in php_zip_extract_file() local 1974 struct zip_stat sb; local 1985 RETURN_SB(&sb); 1996 struct zip_stat sb; local 2008 RETURN_SB(&sb); 2192 struct zip_stat sb; local 2255 struct zip_stat sb; local 2320 struct zip_stat sb; local 2444 struct zip_stat sb; local 2906 if (sb.size < 1) { [all …]
|
H A D | php_zip.h | 62 struct zip_stat sb; member 92 php_stream *php_stream_zip_open(struct zip *arch, struct zip_stat *sb, const char *mode, zip_flags_…
|
/PHP-8.3/ext/zip/tests/ |
H A D | oo_delete.phpt | 57 $sb = $zip->statIndex(0); 58 var_dump($sb); 59 $sb = $zip->statIndex(1); 60 var_dump($sb); 61 $sb = $zip->statIndex(2); 62 var_dump($sb);
|
H A D | oo_addglob2.phpt | 49 $sb = $zip->statIndex($i); 50 echo "$i: " . $sb['name'] . 51 ", comp=" . $sb['comp_method'] . 52 ", enc=" . $sb['encryption_method'] . "\n";
|
H A D | utils.inc | 4 $sb = $z->statIndex($i); 5 echo $i . ' ' . $sb['name'] . "\n";
|
H A D | bug7658.phpt | 41 $sb = $zip->statIndex($i); 42 $found[] = $sb['name'];
|
/PHP-8.3/ext/phar/ |
H A D | func_interceptors.c | 492 zend_stat_t sb = {0}; in phar_file_stat() local 543 sb.st_size = 0; in phar_file_stat() 544 sb.st_mode = 0777; in phar_file_stat() 583 sb.st_size = 0; in phar_file_stat() 616 sb.st_size = 0; in phar_file_stat() 630 sb.st_mode = (sb.st_mode & 0555) | (sb.st_mode & ~0777); in phar_file_stat() 633 sb.st_nlink = 1; in phar_file_stat() 634 sb.st_rdev = -1; in phar_file_stat() 636 sb.st_dev = 0xc; in phar_file_stat() 642 sb.st_blksize = -1; in phar_file_stat() [all …]
|
H A D | stream.c | 503 ssb->sb.st_mtime = data->timestamp; in phar_dostat() 507 ssb->sb.st_size = 0; in phar_dostat() 515 ssb->sb.st_size = 0; in phar_dostat() 516 ssb->sb.st_mode = 0777; in phar_dostat() 523 ssb->sb.st_mode = (ssb->sb.st_mode & 0555) | (ssb->sb.st_mode & ~0777); in phar_dostat() 526 ssb->sb.st_nlink = 1; in phar_dostat() 527 ssb->sb.st_rdev = -1; in phar_dostat() 529 ssb->sb.st_dev = 0xc; in phar_dostat() 532 ssb->sb.st_ino = data->inode; in phar_dostat() 535 ssb->sb.st_blksize = -1; in phar_dostat() [all …]
|
/PHP-8.3/ext/standard/ |
H A D | ftp_fopen_wrapper.c | 792 ssb->sb.st_mode |= S_IFREG; in php_stream_ftp_url_stat() 812 ssb->sb.st_size = 0; in php_stream_ftp_url_stat() 861 ssb->sb.st_mtime = -1; in php_stream_ftp_url_stat() 865 ssb->sb.st_dev = 0; in php_stream_ftp_url_stat() 866 ssb->sb.st_uid = 0; in php_stream_ftp_url_stat() 867 ssb->sb.st_gid = 0; in php_stream_ftp_url_stat() 868 ssb->sb.st_atime = -1; in php_stream_ftp_url_stat() 869 ssb->sb.st_ctime = -1; in php_stream_ftp_url_stat() 871 ssb->sb.st_nlink = 1; in php_stream_ftp_url_stat() 872 ssb->sb.st_rdev = -1; in php_stream_ftp_url_stat() [all …]
|
H A D | link.c | 97 zend_stat_t sb = {0}; in PHP_FUNCTION() local 112 ret = VCWD_LSTAT(link, &sb); in PHP_FUNCTION() 120 RETURN_LONG((zend_long) sb.st_dev); in PHP_FUNCTION()
|
H A D | iptc.c | 181 zend_stat_t sb = {0}; in PHP_FUNCTION() local 206 if (zend_fstat(fileno(fp), &sb) != 0) { in PHP_FUNCTION() 210 spoolbuf = zend_string_safe_alloc(1, iptcdata_len + sizeof(psheader) + 1024 + 1, sb.st_size, 0); in PHP_FUNCTION() 212 memset(poi, 0, iptcdata_len + sizeof(psheader) + sb.st_size + 1024 + 1); in PHP_FUNCTION()
|
H A D | file.c | 1421 ZVAL_LONG(&stat_dev, stat_ssb.sb.st_dev); in php_fstat() 1422 ZVAL_LONG(&stat_ino, stat_ssb.sb.st_ino); in php_fstat() 1423 ZVAL_LONG(&stat_mode, stat_ssb.sb.st_mode); in php_fstat() 1425 ZVAL_LONG(&stat_uid, stat_ssb.sb.st_uid); in php_fstat() 1426 ZVAL_LONG(&stat_gid, stat_ssb.sb.st_gid); in php_fstat() 1428 ZVAL_LONG(&stat_rdev, stat_ssb.sb.st_rdev); in php_fstat() 1432 ZVAL_LONG(&stat_size, stat_ssb.sb.st_size); in php_fstat() 1554 if (S_ISDIR(src_s.sb.st_mode)) { in php_copy_file_ctx() 1569 if (S_ISDIR(dest_s.sb.st_mode)) { in php_copy_file_ctx() 1573 if (!src_s.sb.st_ino || !dest_s.sb.st_ino) { in php_copy_file_ctx() [all …]
|
/PHP-8.3/win32/ |
H A D | glob.c | 531 zend_stat_t sb = {0}; in glob2() local 542 if (g_lstat(pathbuf, &sb, pglob)) in glob2() 546 !IS_SLASH(pathend[-1])) && (S_ISDIR(sb.st_mode) || in glob2() 547 (S_ISLNK(sb.st_mode) && in glob2() 548 (g_stat(pathbuf, &sb, pglob) == 0) && in glob2() 549 S_ISDIR(sb.st_mode)))) { in glob2() 816 return((*pglob->gl_lstat)(buf, sb)); in g_lstat() 817 return(php_sys_lstat(buf, sb)); in g_lstat() 820 static int g_stat(Char *fn, zend_stat_t *sb, glob_t *pglob) in g_stat() argument 827 return((*pglob->gl_stat)(buf, sb)); in g_stat() [all …]
|
/PHP-8.3/main/streams/ |
H A D | plain_wrapper.c | 158 zend_stat_t sb; member 169 r = zend_fstat(fd, &d->sb); in do_fstat() 258 self->is_seekable = !(S_ISFIFO(self->sb.st_mode) || S_ISCHR(self->sb.st_mode)); in detect_is_seekable() 664 memcpy(&ssb->sb, &data->sb, sizeof(ssb->sb)); in php_stdiop_stat() 1231 return VCWD_LSTAT(url, &ssb->sb); in php_plain_files_url_stater() 1236 return VCWD_LSTAT(url, &ssb->sb); in php_plain_files_url_stater() 1240 return VCWD_STAT(url, &ssb->sb); in php_plain_files_url_stater() 1306 zend_stat_t sb; in php_plain_files_rename() local 1323 if (VCWD_CHOWN(url_to, sb.st_uid, sb.st_gid)) { in php_plain_files_rename() 1392 zend_stat_t sb; in php_plain_files_mkdir() local [all …]
|
H A D | memory.c | 199 ssb->sb.st_size = ZSTR_LEN(ms->data); in php_stream_memory_stat() 200 ssb->sb.st_mode |= S_IFREG; /* regular file */ in php_stream_memory_stat() 201 ssb->sb.st_mtime = timestamp; in php_stream_memory_stat() 202 ssb->sb.st_atime = timestamp; in php_stream_memory_stat() 203 ssb->sb.st_ctime = timestamp; in php_stream_memory_stat() 204 ssb->sb.st_nlink = 1; in php_stream_memory_stat() 205 ssb->sb.st_rdev = -1; in php_stream_memory_stat() 207 ssb->sb.st_dev = 0xC; in php_stream_memory_stat() 209 ssb->sb.st_ino = 0; in php_stream_memory_stat() 212 ssb->sb.st_blksize = -1; in php_stream_memory_stat() [all …]
|
/PHP-8.3/ext/fileinfo/ |
H A D | libmagic.patch | 618 + if (st.sb.st_size < 8 || st.sb.st_size > maxoff_t()) { 655 + if (php_stream_read(stream, map->p, (size_t)st.sb.st_size) != (size_t)st.sb.st_size) { 1640 - ret = lstat(fn, sb); 1656 - sb->st_mode = S_IFBLK; 1726 COMMA, major(sb->st_rdev), dv_unit(sb->st_rdev), 1754 - COMMA, major(sb->st_rdev), dv_unit(sb->st_rdev), 2437 - const struct stat *sb) 2502 - struct stat sb; 2503 + zend_stat_t sb = {0}; 2543 - sb.st_mode = S_IFBLK; [all …]
|
H A D | fileinfo.c | 395 if (ssb.sb.st_mode & S_IFDIR) { in _php_finfo_get_type() 410 if (ssb.sb.st_mode & S_IFDIR) { in _php_finfo_get_type()
|
/PHP-8.3/main/ |
H A D | php_ini.c | 635 zend_stat_t sb = {0}; in php_init_config() local 676 if (VCWD_STAT(ini_file, &sb) == 0) { in php_init_config() 677 if (S_ISREG(sb.st_mode)) { in php_init_config() 761 zend_stat_t sb = {0}; in php_parse_user_ini_file() local 766 if (VCWD_STAT(ini_file, &sb) == 0) { in php_parse_user_ini_file() 767 if (S_ISREG(sb.st_mode)) { in php_parse_user_ini_file()
|
/PHP-8.3/ext/standard/tests/strings/ |
H A D | strval_variation2.phpt | 18 $sb = "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"; 46 echo bin2hex(strval($sb));
|
/PHP-8.3/ext/mysqli/tests/ |
H A D | 026.phpt | 23 mysqli_stmt_bind_param($stmt, "sb", $c1, $c2);
|
/PHP-8.3/ext/pdo_odbc/ |
H A D | odbc_stmt.c | 417 php_stream_statbuf sb; in odbc_stmt_param_hook() local 425 if (0 == php_stream_stat(stm, &sb)) { in odbc_stmt_param_hook() 448 P->len = SQL_LEN_DATA_AT_EXEC(sb.sb.st_size); in odbc_stmt_param_hook()
|