/PHP-7.4/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.4/ext/fileinfo/libmagic/ |
H A D | cdf.c | 357 char buf[512]; in cdf_read_header() local 654 char *buf; in cdf_read_dir() local 693 efree(buf); in cdf_read_dir() 697 efree(buf); in cdf_read_dir() 1289 buf[i] = '\0'; in cdf_u16tos8() 1290 return buf; in cdf_u16tos8() 1384 char buf[26]; in cdf_dump_dir() local 1434 char buf[64]; in cdf_dump_property_info() local 1438 cdf_print_property_name(buf, sizeof(buf), info[i].pi_id); in cdf_dump_property_info() 1478 cdf_print_elapsed_time(buf, sizeof(buf), tp); in cdf_dump_property_info() [all …]
|
H A D | magic.c | 227 unsigned char *buf; in file_or_stream() local 240 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, &sb, inname, buf, CAST(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, 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 | apptype.c | 45 file_os2_apptype(struct magic_set *ms, const char *fn, const void *buf, in file_os2_apptype() argument 72 if (fwrite(buf, 1, nb, fp) != nb) { in file_os2_apptype() 132 if (strncmp((const char *)buf, "MZ", 2)) in file_os2_apptype()
|
/PHP-7.4/ext/opcache/ |
H A D | zend_accelerator_util_funcs.c | 839 #define ADLER32_DO1(buf) {s1 += *(buf); s2 += s1;} argument 840 #define ADLER32_DO2(buf, i) ADLER32_DO1(buf + i); ADLER32_DO1(buf + i + 1); argument 841 #define ADLER32_DO4(buf, i) ADLER32_DO2(buf, i); ADLER32_DO2(buf, i + 2); argument 842 #define ADLER32_DO8(buf, i) ADLER32_DO4(buf, i); ADLER32_DO4(buf, i + 4); argument 843 #define ADLER32_DO16(buf) ADLER32_DO8(buf, 0); ADLER32_DO8(buf, 8); argument 855 ADLER32_DO16(buf); in zend_adler32() 856 buf += 16; in zend_adler32() 868 buf += 16; in zend_adler32() 872 end = buf + len; in zend_adler32() 874 ADLER32_DO1(buf); in zend_adler32() [all …]
|
/PHP-7.4/Zend/ |
H A D | zend_stream.h | 32 typedef ssize_t (*zend_stream_reader_t)(void* handle, char *buf, size_t len); 62 char *buf; member 70 ZEND_API int zend_stream_fixup(zend_file_handle *file_handle, char **buf, size_t *len);
|
/PHP-7.4/ext/mysqlnd/ |
H A D | mysqlnd_wireprotocol.c | 203 const zend_uchar *p = buf; in php_mysqlnd_read_error_from_line() 326 zend_uchar buf[2048]; in php_mysqlnd_greet_read() local 327 const zend_uchar * p = buf; in php_mysqlnd_greet_read() 654 const zend_uchar * p = buf; in php_mysqlnd_auth_response_read() 818 const zend_uchar * p = buf; in php_mysqlnd_ok_read() 912 const zend_uchar * p = buf; in php_mysqlnd_eof_read() 1049 const zend_uchar * p = buf; in php_mysqlnd_rset_header_read() 1915 zend_uchar *p = buf; in php_mysqlnd_prepare_read() 1998 zend_uchar *p = buf; in php_mysqlnd_chg_user_read() 2110 zend_uchar *p = buf; in php_mysqlnd_sha256_pk_request_response_read() [all …]
|
/PHP-7.4/ext/sockets/tests/ |
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;
|
H A D | socket_sentto_recvfrom_unix.phpt | 21 var_dump(socket_recvfrom($socket, $buf, 12, 0, $from, $port)); //false (EAGAIN, no warning) 40 var_dump(socket_recvfrom($socket, $buf, 0, 0, $from)); // expect false 41 $bytes_received = socket_recvfrom($socket, $buf, 12, 0, $from); 49 echo "Received $buf";
|
/PHP-7.4/ext/standard/ |
H A D | scanf.c | 932 buf[0] = '\0'; in php_sscanf_internal() 935 width = sizeof(buf) - 1; in php_sscanf_internal() 939 for (end = buf; width > 0; width--) { in php_sscanf_internal() 1000 if ((flags & SCAN_XOK) && (end == buf+1)) { in php_sscanf_internal() 1044 value = (zend_long) (*fn)(buf, NULL, base); in php_sscanf_internal() 1046 snprintf(buf, sizeof(buf), ZEND_ULONG_FMT, value); /* INTL: ISO digit */ in php_sscanf_internal() 1052 ZEND_TRY_ASSIGN_REF_STRING(current, buf); in php_sscanf_internal() 1073 buf[0] = '\0'; /* call me pedantic */ in php_sscanf_internal() 1075 width = sizeof(buf) - 1; in php_sscanf_internal() 1078 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() 1144 switch (buf[3]) { in php_handle_webp() 1148 format = buf[3]; in php_handle_webp() 1158 result->width = buf[14] + ((buf[15] & 0x3F) << 8); in php_handle_webp() 1159 result->height = buf[16] + ((buf[17] & 0x3F) << 8); in php_handle_webp() 1162 result->width = buf[9] + ((buf[10] & 0x3F) << 8) + 1; in php_handle_webp() 1163 result->height = (buf[10] >> 6) + (buf[11] << 2) + ((buf[12] & 0xF) << 10) + 1; in php_handle_webp() 1166 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()
|
H A D | filestat.c | 150 struct statvfs buf; 152 struct statfs buf; 160 if (buf.f_frsize) { 161 bytestotal = (((double)buf.f_blocks) * ((double)buf.f_frsize)); 163 bytestotal = (((double)buf.f_blocks) * ((double)buf.f_bsize)); 171 bytestotal = (((double)buf.f_bsize) * ((double)buf.f_blocks)); 250 struct statvfs buf; 252 struct statfs buf; 261 bytesfree = (((double)buf.f_bavail) * ((double)buf.f_frsize)); 263 bytesfree = (((double)buf.f_bavail) * ((double)buf.f_bsize)); [all …]
|
H A D | versioning.c | 33 char *buf = safe_emalloc(len, 2, 1), *q, lp, lq; in php_canonicalize_version() local 37 *buf = '\0'; in php_canonicalize_version() 38 return buf; in php_canonicalize_version() 42 q = buf; in php_canonicalize_version() 74 return buf; in php_canonicalize_version()
|
/PHP-7.4/ext/fileinfo/ |
H A D | libmagic.patch | 957 - free(buf); 1238 - free(buf); 1243 - free(buf); 1849 char *buf; 2266 - len = asprintf(&newstr, "%s%s", ms->o.buf, buf); 2273 - ms->o.buf = buf; 2297 + spprintf(&newstr, 0, "%s%s", ms->o.buf, (buf ? buf : "")); 2304 + ms->o.buf = buf; 2330 - if (ms->o.buf && *ms->o.buf) 2568 pb->buf = ms->o.buf; [all …]
|
/PHP-7.4/main/ |
H A D | php_streams.h | 118 ssize_t (*write)(php_stream *stream, const char *buf, size_t count); 119 ssize_t (*read)(php_stream *stream, char *buf, size_t count); 308 PHPAPI ssize_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 313 PHPAPI ssize_t _php_stream_write(php_stream *stream, const char *buf, size_t count); 315 #define php_stream_write(stream, buf, count) _php_stream_write(stream, (buf), (count)) argument 338 #define php_stream_gets(stream, buf, maxlen) _php_stream_get_line((stream), (buf), (maxlen), NULL) argument 340 #define php_stream_get_line(stream, buf, maxlen, retlen) _php_stream_get_line((stream), (buf), (max… argument 344 PHPAPI int _php_stream_puts(php_stream *stream, const char *buf); 345 #define php_stream_puts(stream, buf) _php_stream_puts((stream), (buf)) argument [all …]
|
/PHP-7.4/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()
|
/PHP-7.4/ext/openssl/tests/ |
H A D | bug77390.phpt | 25 $buf = ''; 30 $buf .= $chunk; 33 if ($buf !== 'warmup') { 37 $buf = ''; 45 if ($buf === 'hello, world') {
|
/PHP-7.4/ext/mysqli/ |
H A D | mysqli_api.c | 406 stmt->result.buf = (VAR_BUFFER *) p; in mysqli_stmt_bind_result_do_bind() 470 stmt->result.buf[ofs].val = (char *)emalloc(stmt->result.buf[ofs].buflen); in mysqli_stmt_bind_result_do_bind() 517 stmt->result.buf[ofs].buflen = in mysqli_stmt_bind_result_do_bind() 526 ++stmt->result.buf[ofs].buflen; in mysqli_stmt_bind_result_do_bind() 528 stmt->result.buf[ofs].val = (char *)emalloc(stmt->result.buf[ofs].buflen); in mysqli_stmt_bind_result_do_bind() 548 if (stmt->result.buf[i].val) { in mysqli_stmt_bind_result_do_bind() 549 efree(stmt->result.buf[i].val); in mysqli_stmt_bind_result_do_bind() 553 efree(stmt->result.buf); in mysqli_stmt_bind_result_do_bind() 962 memset(stmt->result.buf[i].val, 0, stmt->result.buf[i].buflen); 981 switch (stmt->result.buf[i].type) { [all …]
|
/PHP-7.4/main/streams/ |
H A D | streams.c | 700 buf += toread; in _php_stream_read() 810 char buf; in _php_stream_getc() local 856 if (!buf) { in php_stream_locate_eol() 961 buf += cpysz; in _php_stream_get_line() 998 buf[0] = '\0'; in _php_stream_get_line() 1174 if (buf) { in _php_stream_write_filtered() 1276 char *buf; in _php_stream_printf() local 1283 if (!buf) { in _php_stream_printf() 1288 efree(buf); in _php_stream_printf() 1419 char buf[8192]; in _php_stream_passthru() local [all …]
|
H A D | memory.c | 70 assert(buf!= NULL); in php_stream_memory_write() 71 memcpy(ms->data+ms->fpos, (char*)buf, count); in php_stream_memory_write() 94 assert(buf!= NULL); in php_stream_memory_read() 95 memcpy(buf, ms->data+ms->fpos, count); in php_stream_memory_read() 330 ms->data = buf; in _php_stream_memory_open() 334 assert(buf != NULL); in _php_stream_memory_open() 335 php_stream_write(stream, buf, length); in _php_stream_memory_open() 395 return php_stream_write(ts->innerstream, buf, count); in php_stream_temp_write() 412 got = php_stream_read(ts->innerstream, buf, count); in php_stream_temp_read() 611 assert(buf != NULL); in _php_stream_temp_open() [all …]
|
/PHP-7.4/ext/standard/tests/file/ |
H A D | proc_open01.phpt | 44 $buf = fread($pipes[1], 1024); 45 $cnt .= $buf; 46 $left -= strlen($buf);
|
/PHP-7.4/ext/phar/ |
H A D | dirstream.h | 28 static ssize_t phar_dir_write(php_stream *stream, const char *buf, size_t count); 29 static ssize_t phar_dir_read( php_stream *stream, char *buf, size_t count);
|
H A D | util.c | 1476 unsigned char buf[1024]; in phar_verify_signature() local 1564 read_size = sizeof(buf); in phar_verify_signature() 1614 read_size = sizeof(buf); in phar_verify_signature() 1771 unsigned char buf[1024]; in phar_create_signature() local 1788 while ((sig_len = php_stream_read(fp, (char*)buf, sizeof(buf))) > 0) { in phar_create_signature() 1803 while ((sig_len = php_stream_read(fp, (char*)buf, sizeof(buf))) > 0) { in phar_create_signature() 1853 while ((sig_len = php_stream_read(fp, (char*)buf, sizeof(buf))) > 0) { in phar_create_signature() 1901 while ((sig_len = php_stream_read(fp, (char*)buf, sizeof(buf))) > 0) { in phar_create_signature() 1916 while ((sig_len = php_stream_read(fp, (char*)buf, sizeof(buf))) > 0) { in phar_create_signature() 1980 efree(buf); in phar_update_cached_entry() [all …]
|
/PHP-7.4/ext/zlib/tests/ |
H A D | gzreadgzwrite.phpt | 20 while ($buf = gzread($fp, 8092)) { 21 $data .= $buf;
|