/PHP-7.3/ext/fileinfo/libmagic/ |
H A D | magic.c | 228 unsigned char *buf; in file_or_stream() local 245 if ((buf = CAST(unsigned char *, emalloc(ms->bytes_max + SLOP))) == NULL) in file_or_stream() 279 if ((nbytes = php_stream_read(stream, (char *)buf, ms->bytes_max - nbytes)) < 0) { in file_or_stream() 284 (void)memset(buf + nbytes, 0, SLOP); /* NUL terminate */ in file_or_stream() 285 if (file_buffer(ms, stream, inname, buf, (size_t)nbytes) == -1) in file_or_stream() 289 efree(buf); in file_or_stream() 300 magic_buffer(struct magic_set *ms, const void *buf, size_t nb) in magic_buffer() argument 310 if (file_buffer(ms, NULL, NULL, buf, nb) == -1) { in magic_buffer() 321 return (ms->event_flags & EVENT_HAD_ERR) ? ms->o.buf : NULL; in magic_error()
|
H A D | cdf.c | 352 char buf[512]; in cdf_read_header() local 355 if (cdf_read(info, (zend_off_t)0, buf, sizeof(buf)) == -1) in cdf_read_header() 649 char *buf; in cdf_read_dir() local 687 efree(buf); in cdf_read_dir() 691 efree(buf); in cdf_read_dir() 1282 buf[i] = '\0'; in cdf_u16tos8() 1283 return buf; in cdf_u16tos8() 1427 char buf[64]; in cdf_dump_property_info() local 1431 cdf_print_property_name(buf, sizeof(buf), info[i].pi_id); in cdf_dump_property_info() 1471 cdf_print_elapsed_time(buf, sizeof(buf), tp); in cdf_dump_property_info() [all …]
|
/PHP-7.3/Zend/tests/ |
H A D | bug70805.phpt | 15 unset($GLOBALS["a"]); // this will be called in gc_colloct_roots and put $a into gc roots buf 40 unset($a); // This one can not be putted into roots buf because it's full, thus gc_colloct_roots wi… 41 // but C::__destructor which is called in gc_colloct_roots will put $a into buf 42 // which will make $a be putted into gc roots buf twice
|
/PHP-7.3/main/ |
H A D | spprintf.h | 27 PHPAPI void php_printf_to_smart_string(smart_string *buf, const char *format, va_list ap); 28 PHPAPI void php_printf_to_smart_str(smart_str *buf, const char *format, va_list ap);
|
H A D | explicit_bzero.c | 42 volatile unsigned char *buf = (volatile unsigned char *)dst; in php_explicit_bzero() 45 buf[i] = 0; in php_explicit_bzero()
|
H A D | php_streams.h | 118 size_t (*write)(php_stream *stream, const char *buf, size_t count); 119 size_t (*read)(php_stream *stream, char *buf, size_t count); 308 PHPAPI size_t _php_stream_read(php_stream *stream, char *buf, size_t count); 309 #define php_stream_read(stream, buf, count) _php_stream_read((stream), (buf), (count)) argument 311 PHPAPI size_t _php_stream_write(php_stream *stream, const char *buf, size_t count); 313 #define php_stream_write(stream, buf, count) _php_stream_write(stream, (buf), (count)) argument 336 #define php_stream_gets(stream, buf, maxlen) _php_stream_get_line((stream), (buf), (maxlen), NULL) argument 338 #define php_stream_get_line(stream, buf, maxlen, retlen) _php_stream_get_line((stream), (buf), (max… argument 342 PHPAPI int _php_stream_puts(php_stream *stream, const char *buf); 343 #define php_stream_puts(stream, buf) _php_stream_puts((stream), (buf)) argument [all …]
|
/PHP-7.3/ext/standard/ |
H A D | info.c | 71 char *buf; in php_info_printf() local 76 len = vspprintf(&buf, 0, fmt, argv); in php_info_printf() 80 efree(buf); in php_info_printf() 724 struct utsname buf; in php_get_uname() local 729 php_uname = buf.sysname; in php_get_uname() 731 php_uname = buf.release; in php_get_uname() 733 php_uname = buf.nodename; in php_get_uname() 735 php_uname = buf.version; in php_get_uname() 737 php_uname = buf.machine; in php_get_uname() 740 buf.sysname, buf.nodename, buf.release, buf.version, in php_get_uname() [all …]
|
H A D | scanf.c | 937 buf[0] = '\0'; in php_sscanf_internal() 940 width = sizeof(buf) - 1; in php_sscanf_internal() 944 for (end = buf; width > 0; width--) { in php_sscanf_internal() 1005 if ((flags & SCAN_XOK) && (end == buf+1)) { in php_sscanf_internal() 1049 value = (zend_long) (*fn)(buf, NULL, base); in php_sscanf_internal() 1051 snprintf(buf, sizeof(buf), ZEND_ULONG_FMT, value); /* INTL: ISO digit */ in php_sscanf_internal() 1058 ZVAL_STRING(current, buf); in php_sscanf_internal() 1080 buf[0] = '\0'; /* call me pedantic */ in php_sscanf_internal() 1082 width = sizeof(buf) - 1; in php_sscanf_internal() 1085 for (end = buf; width > 0; width--) { in php_sscanf_internal() [all …]
|
H A D | image.c | 245 buf = erealloc(buf, szlength); in php_handle_swc() 257 if (buf) { in php_handle_swc() 258 efree(buf); in php_handle_swc() 1138 switch (buf[3]) { in php_handle_webp() 1142 format = buf[3]; in php_handle_webp() 1152 result->width = buf[14] + ((buf[15] & 0x3F) << 8); in php_handle_webp() 1153 result->height = buf[16] + ((buf[17] & 0x3F) << 8); in php_handle_webp() 1156 result->width = buf[9] + ((buf[10] & 0x3F) << 8) + 1; in php_handle_webp() 1157 result->height = (buf[10] >> 6) + (buf[11] << 2) + ((buf[12] & 0xF) << 10) + 1; in php_handle_webp() 1160 result->width = buf[12] + (buf[13] << 8) + (buf[14] << 16) + 1; in php_handle_webp() [all …]
|
H A D | crypt_blowfish.c | 839 } buf; in php_crypt_blowfish_rn() local 853 memcpy(buf.s, test_setting, sizeof(buf.s)); in php_crypt_blowfish_rn() 858 buf.s[2] = setting[2]; in php_crypt_blowfish_rn() 860 memset(buf.o, 0x55, sizeof(buf.o)); in php_crypt_blowfish_rn() 861 buf.o[sizeof(buf.o) - 1] = 0; in php_crypt_blowfish_rn() 862 p = BF_crypt(test_key, buf.s, buf.o, sizeof(buf.o) - (1 + 1), 1); in php_crypt_blowfish_rn() 864 ok = (p == buf.o && in php_crypt_blowfish_rn() 865 !memcmp(p, buf.s, 7 + 22) && in php_crypt_blowfish_rn()
|
/PHP-7.3/ext/gd/libgd/ |
H A D | gd_io_file.c | 77 static int filePutbuf (gdIOCtx * ctx, const void *buf, int size) in filePutbuf() argument 82 return fwrite(buf, 1, size, fctx->f); in filePutbuf() 86 static int fileGetbuf (gdIOCtx * ctx, void *buf, int size) in fileGetbuf() argument 91 return fread(buf, 1, size, fctx->f); in fileGetbuf()
|
/PHP-7.3/sapi/phpdbg/ |
H A D | phpdbg_out.h | 70 #define phpdbg_xml_asprintf(buf, ...) _phpdbg_xml_asprintf(buf, ##__VA_ARGS__) argument 71 PHPDBG_API int _phpdbg_xml_asprintf(char **buf, const char *format, zend_bool escape_xml, ...); 73 #define phpdbg_asprintf(buf, ...) _phpdbg_asprintf(buf, ##__VA_ARGS__) argument 74 PHPDBG_API int _phpdbg_asprintf(char **buf, const char *format, ...);
|
H A D | phpdbg_prompt.c | 465 char *buf; in PHPDBG_COMMAND() local 482 if (!memcmp(sep, nl, seplen) && (*buf == '\n' || (*buf == '\r' && buf[1] == '\n'))) { in PHPDBG_COMMAND() 491 buf++; in PHPDBG_COMMAND() 493 if (buf != nl && buf <= nl + seplen) { in PHPDBG_COMMAND() 557 memmove(data->buf, data->buf + 2, data->len); in phpdbg_compile_stdin() 568 char *buf; in phpdbg_compile() local 581 if (len >= 3 && buf[0] == '#' && buf[1] == '!') { in phpdbg_compile() 591 start_line_len = fh.handle.stream.mmap.buf - buf; in phpdbg_compile() 625 fh.handle.stream.mmap.buf = buf; in phpdbg_compile() 841 char *buf = emalloc(end - p + 1), *q = buf; in PHPDBG_COMMAND() local [all …]
|
/PHP-7.3/win32/ |
H A D | winutil.c | 27 char *buf = NULL; in php_win32_error_to_msg() local 31 NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&buf, 0, NULL in php_win32_error_to_msg() 34 return (buf ? (char *) buf : ""); in php_win32_error_to_msg() 83 PHP_WINUTIL_API int php_win32_get_random_bytes(unsigned char *buf, size_t size) in php_win32_get_random_bytes() argument 98 ret = NT_SUCCESS(BCryptGenRandom(bcrypt_algo, buf, (ULONG)size, 0)); in php_win32_get_random_bytes()
|
/PHP-7.3/Zend/ |
H A D | zend_virtual_cwd.h | 119 CWD_API int php_sys_stat_ex(const char *path, zend_stat_t *buf, int lstat); 120 # define php_sys_stat(path, buf) php_sys_stat_ex(path, buf, 0) argument 121 # define php_sys_lstat(path, buf) php_sys_stat_ex(path, buf, 1) argument 143 CWD_API char *virtual_getcwd(char *buf, size_t size); 153 CWD_API int virtual_stat(const char *path, zend_stat_t *buf); 154 CWD_API int virtual_lstat(const char *path, zend_stat_t *buf); 163 CWD_API int virtual_utime(const char *filename, struct utimbuf *buf); 243 #define VCWD_GETWD(buf) argument 297 #define VCWD_GETWD(buf) getwd(buf) argument
|
H A D | zend_stream.h | 32 typedef size_t (*zend_stream_reader_t)(void* handle, char *buf, size_t len); 49 char *buf; member 77 ZEND_API int zend_stream_fixup(zend_file_handle *file_handle, char **buf, size_t *len);
|
H A D | zend_virtual_cwd.c | 278 buf->st_dev = buf->st_rdev = pathw[0] - L'A'; in php_sys_stat_ex() 280 buf->st_dev = buf->st_rdev = pathw[0] - L'a'; in php_sys_stat_ex() 283 buf->st_dev = buf->st_rdev = 0; in php_sys_stat_ex() 290 buf->st_dev = buf->st_rdev = pathw[0] - L'A'; in php_sys_stat_ex() 292 buf->st_dev = buf->st_rdev = pathw[0] - L'a'; in php_sys_stat_ex() 295 buf->st_dev = buf->st_rdev = -1; in php_sys_stat_ex() 298 buf->st_dev = buf->st_rdev = -1; in php_sys_stat_ex() 302 buf->st_uid = buf->st_gid = buf->st_ino = 0; in php_sys_stat_ex() 378 zend_stat_t buf; in php_is_dir_ok() local 389 zend_stat_t buf; in php_is_file_ok() local [all …]
|
/PHP-7.3/ext/sockets/tests/ |
H A D | socket_sentto_recvfrom_ipv4_udp.phpt | 24 var_dump(socket_recvfrom($socket, $buf, 12, 0, $from, $port)); //false (EAGAIN - no warning) 37 socket_recvfrom($socket, $buf, 12, 0); // cause warning 38 socket_recvfrom($socket, $buf, 12, 0, $from); // cause warning 39 $bytes_received = socket_recvfrom($socket, $buf, 12, 0, $from, $port); 45 echo "Received $buf from remote address $from and remote port $port" . PHP_EOL;
|
H A D | socket_sentto_recvfrom_ipv6_udp.phpt | 21 var_dump(socket_recvfrom($socket, $buf, 12, 0, $from, $port)); // false (EAGAIN, no warning) 39 socket_recvfrom($socket, $buf, 12, 0); // cause warning 40 socket_recvfrom($socket, $buf, 12, 0, $from); // cause warning 41 $bytes_received = socket_recvfrom($socket, $buf, 12, 0, $from, $port); 47 echo "Received $buf from remote address $from and remote port $port" . PHP_EOL;
|
H A D | socket_sentto_recvfrom_ipv6_udp-win32.phpt | 21 socket_recvfrom($socket, $buf, 12, 0, $from, $port); // cause warning 39 socket_recvfrom($socket, $buf, 12, 0); // cause warning 40 socket_recvfrom($socket, $buf, 12, 0, $from); // cause warning 41 $bytes_received = socket_recvfrom($socket, $buf, 12, 0, $from, $port); 47 echo "Received $buf from remote address $from and remote port $port" . PHP_EOL;
|
/PHP-7.3/ext/dba/ |
H A D | dba_dbm.c | 44 snprintf(buf, MAXPATHLEN, "%s" extension, info->path); \ 45 buf[MAXPATHLEN-1] = '\0'; \ 46 if((fd = VCWD_OPEN_MODE(buf, O_CREAT | mode | O_WRONLY, filemode)) == -1) \ 65 char buf[MAXPATHLEN]; in DBA_OPEN_FUNC() local 73 char buf[MAXPATHLEN]; in DBA_OPEN_FUNC() local
|
/PHP-7.3/main/streams/ |
H A D | streams.c | 686 buf += toread; in _php_stream_read() 767 char buf; in _php_stream_getc() local 813 if (!buf) { in php_stream_locate_eol() 918 buf += cpysz; in _php_stream_get_line() 955 buf[0] = '\0'; in _php_stream_get_line() 1133 if (buf) { in _php_stream_write_filtered() 1226 char *buf; in _php_stream_printf() local 1233 if (!buf) { in _php_stream_printf() 1238 efree(buf); in _php_stream_printf() 1369 char buf[8192]; in _php_stream_passthru() local [all …]
|
/PHP-7.3/ext/opcache/ |
H A D | zend_accelerator_util_funcs.c | 880 #define ADLER32_DO1(buf) {s1 += *(buf); s2 += s1;} argument 881 #define ADLER32_DO2(buf, i) ADLER32_DO1(buf + i); ADLER32_DO1(buf + i + 1); argument 882 #define ADLER32_DO4(buf, i) ADLER32_DO2(buf, i); ADLER32_DO2(buf, i + 2); argument 883 #define ADLER32_DO8(buf, i) ADLER32_DO4(buf, i); ADLER32_DO4(buf, i + 4); argument 884 #define ADLER32_DO16(buf) ADLER32_DO8(buf, 0); ADLER32_DO8(buf, 8); argument 896 ADLER32_DO16(buf); in zend_adler32() 897 buf += 16; in zend_adler32() 909 buf += 16; in zend_adler32() 913 end = buf + len; in zend_adler32() 915 ADLER32_DO1(buf); in zend_adler32() [all …]
|
/PHP-7.3/ext/mysqli/ |
H A D | mysqli_api.c | 405 stmt->result.buf = (VAR_BUFFER *) p; in mysqli_stmt_bind_result_do_bind() 469 stmt->result.buf[ofs].val = (char *)emalloc(stmt->result.buf[ofs].buflen); in mysqli_stmt_bind_result_do_bind() 516 stmt->result.buf[ofs].buflen = in mysqli_stmt_bind_result_do_bind() 525 ++stmt->result.buf[ofs].buflen; in mysqli_stmt_bind_result_do_bind() 527 stmt->result.buf[ofs].val = (char *)emalloc(stmt->result.buf[ofs].buflen); in mysqli_stmt_bind_result_do_bind() 547 if (stmt->result.buf[i].val) { in mysqli_stmt_bind_result_do_bind() 548 efree(stmt->result.buf[i].val); in mysqli_stmt_bind_result_do_bind() 552 efree(stmt->result.buf); in mysqli_stmt_bind_result_do_bind() 957 memset(stmt->result.buf[i].val, 0, stmt->result.buf[i].buflen); 982 switch (stmt->result.buf[i].type) { [all …]
|
/PHP-7.3/ext/hash/ |
H A D | hash_fnv.c | 153 fnv_32_buf(void *buf, size_t len, uint32_t hval, int alternate) in fnv_32_buf() argument 155 unsigned char *bp = (unsigned char *)buf; /* start of buffer */ in fnv_32_buf() 196 fnv_64_buf(void *buf, size_t len, uint64_t hval, int alternate) in fnv_64_buf() argument 198 unsigned char *bp = (unsigned char *)buf; /* start of buffer */ in fnv_64_buf()
|