/PHP-7.2/ext/fileinfo/libmagic/ |
H A D | encoding.c | 80 mlen = (nbytes + 1) * sizeof((*ubuf)[0]); in file_encoding() 85 mlen = (nbytes + 1) * sizeof(nbuf[0]); in file_encoding() 127 from_ebcdic(buf, nbytes, nbuf); in file_encoding() 238 for (i = 0; i < nbytes; i++) { in looks_ascii() 257 for (i = 0; i < nbytes; i++) { in looks_latin1() 277 for (i = 0; i < nbytes; i++) { in looks_extended() 311 for (i = 0; i < nbytes; i++) { in file_looks_utf8() 348 if (i >= nbytes) in file_looks_utf8() 407 if (nbytes < 2) in looks_ucs16() 419 for (i = 2; i + 1 < nbytes; i += 2) { in looks_ucs16() [all …]
|
H A D | ascmagic.c | 62 trim_nuls(const unsigned char *buf, size_t nbytes) in trim_nuls() argument 64 while (nbytes > 1 && buf[nbytes - 1] == '\0') in trim_nuls() 65 nbytes--; in trim_nuls() 67 return nbytes; in trim_nuls() 82 nbytes = trim_nuls(buf, nbytes); in file_ascmagic() 85 if (file_encoding(ms, buf, nbytes, &ubuf, &ulen, &code, &code_mime, in file_ascmagic() 89 rv = file_ascmagic_with_encoding(ms, buf, nbytes, ubuf, ulen, code, in file_ascmagic() 99 size_t nbytes, unichar *ubuf, size_t ulen, const char *code, in file_ascmagic_with_encoding() argument 123 nbytes = trim_nuls(buf, nbytes); in file_ascmagic_with_encoding() 126 if (nbytes <= 1) { in file_ascmagic_with_encoding() [all …]
|
H A D | is_tar.c | 63 file_is_tar(struct magic_set *ms, const unsigned char *buf, size_t nbytes) in file_is_tar() argument 75 tar = is_tar(buf, nbytes); in file_is_tar() 93 is_tar(const unsigned char *buf, size_t nbytes) in is_tar() argument 100 if (nbytes < sizeof(*header)) in is_tar()
|
H A D | softmagic.c | 817 o, nbytes); in moffset() 833 (size_t)o, nbytes); in moffset() 1173 if (offset > nbytes) in mcopy() 1240 if (offset >= nbytes) in mcopy() 1265 if (offset >= nbytes) { in mcopy() 1270 nbytes = nbytes - offset; in mcopy() 1272 nbytes = sizeof(*p); in mcopy() 1280 if (nbytes < sizeof(*p)) in mcopy() 1525 if (nbytes < offset) in mget() 1535 if (nbytes < offset) in mget() [all …]
|
H A D | magic.c | 220 ssize_t nbytes = 0; /* number of bytes read from a datafile */ in file_or_stream() local 269 if ((nbytes = php_stream_read(stream, (char *)buf, ms->bytes_max - nbytes)) < 0) { in file_or_stream() 274 (void)memset(buf + nbytes, 0, SLOP); /* NUL terminate */ in file_or_stream() 275 if (file_buffer(ms, stream, inname, buf, (size_t)nbytes) == -1) in file_or_stream()
|
H A D | compress.c | 146 const unsigned char *buf, size_t nbytes) in file_zmagic() argument 166 if (nbytes < compr[i].maglen) in file_zmagic() 178 nsz = nbytes; in file_zmagic() 208 if (file_buffer(ms, -1, NULL, buf, nbytes) == -1) in file_zmagic() 338 size_t nbytes) in file_pipe2file() argument 368 if (swrite(tfd, startbuf, nbytes) != (ssize_t)nbytes) in file_pipe2file()
|
H A D | der.c | 244 der_offs(struct magic_set *ms, struct magic *m, size_t nbytes) in der_offs() argument 247 size_t offs = 0, len = ms->search.s_len ? ms->search.s_len : nbytes; in der_offs() 265 if (offs + tlen > nbytes) in der_offs()
|
H A D | elfclass.h | 27 if (nbytes <= sizeof(elfhdr))
|
H A D | readcdf.c | 534 size_t nbytes) in file_trycdf() argument 548 info.i_len = nbytes; in file_trycdf()
|
/PHP-7.2/ext/gd/libgd/ |
H A D | gd_jpeg.c | 623 ssize_t nbytes = 0; in fill_input_buffer() local 629 while (nbytes < INPUT_BUF_SIZE) { in fill_input_buffer() 630 int got = gdGetBuf(src->buffer + nbytes, INPUT_BUF_SIZE - nbytes, src->infile); in fill_input_buffer() 634 if (!nbytes) { in fill_input_buffer() 635 nbytes = -1; in fill_input_buffer() 639 nbytes += got; in fill_input_buffer() 642 if (nbytes <= 0) { in fill_input_buffer() 650 nbytes = 2; in fill_input_buffer() 654 src->pub.bytes_in_buffer = nbytes; in fill_input_buffer()
|
/PHP-7.2/ext/mbstring/ |
H A D | mbstring.h | 139 size_t nbytes, const mbfl_encoding *enc); 141 size_t nbytes);
|
H A D | mbstring.c | 5356 MBSTRING_API char *php_mb_safe_strrchr_ex(const char *s, unsigned int c, size_t nbytes, const mbfl_… in php_mb_safe_strrchr_ex() argument 5361 if (nbytes == (size_t)-1) { in php_mb_safe_strrchr_ex() 5378 register size_t bcnt = nbytes; in php_mb_safe_strrchr_ex() 5397 MBSTRING_API char *php_mb_safe_strrchr(const char *s, unsigned int c, size_t nbytes) in php_mb_safe_strrchr() argument 5399 return php_mb_safe_strrchr_ex(s, c, nbytes, MBSTRG(internal_encoding)); in php_mb_safe_strrchr()
|
/PHP-7.2/ext/iconv/ |
H A D | iconv.c | 205 static php_iconv_err_t _php_iconv_strlen(size_t *pretval, const char *str, size_t nbytes, const cha… 207 static php_iconv_err_t _php_iconv_substr(smart_str *pretval, const char *str, size_t nbytes, zend_l… 729 static php_iconv_err_t _php_iconv_strlen(size_t *pretval, const char *str, size_t nbytes, const cha… in _php_iconv_strlen() argument 764 for (in_p = str, in_left = nbytes, cnt = 0; in_left > 0; cnt+=2) { in _php_iconv_strlen() 814 const char *str, size_t nbytes, zend_long offset, zend_long len, const char *enc) in _php_iconv_substr() argument 831 err = _php_iconv_strlen(&total_len, str, nbytes, enc); in _php_iconv_substr() 885 for (in_p = str, in_left = nbytes, cnt = 0; in_left > 0 && len > 0; ++cnt) { in _php_iconv_substr()
|
/PHP-7.2/ext/fileinfo/ |
H A D | libmagic.patch | 2648 ssize_t nbytes = 0; /* number of bytes read from a datafile */ 2746 - while ((r = sread(fd, (void *)&buf[nbytes], 2747 - (size_t)(ms->bytes_max - nbytes), 1)) > 0) { 2748 - nbytes += r; 2752 - if (nbytes == 0 && inname) { 2767 - if ((nbytes = read(fd, (char *)buf, howmany)) == -1) { 2775 + if ((nbytes = php_stream_read(stream, (char *)buf, ms->bytes_max - nbytes)) < 0) { 2780 (void)memset(buf + nbytes, 0, SLOP); /* NUL terminate */ 2781 - if (file_buffer(ms, fd, inname, buf, (size_t)nbytes) == -1) 2782 + if (file_buffer(ms, stream, inname, buf, (size_t)nbytes) == -1) [all …]
|
/PHP-7.2/ext/pgsql/ |
H A D | pgsql.c | 3536 int nbytes, argc = ZEND_NUM_ARGS(); local 3553 if ((nbytes = lo_read((PGconn *)pgsql->conn, pgsql->lofd, ZSTR_VAL(buf), ZSTR_LEN(buf)))<0) { 3558 ZSTR_LEN(buf) = nbytes; 3571 size_t str_len, nbytes; local 3599 if ((nbytes = lo_write((PGconn *)pgsql->conn, pgsql->lofd, str, len)) == (size_t)-1) { 3603 RETURN_LONG(nbytes); 3613 volatile int nbytes; local 3626 while ((nbytes = lo_read((PGconn *)pgsql->conn, pgsql->lofd, buf, PGSQL_LO_READ_BUF_SIZE))>0) { 3627 PHPWRITE(buf, nbytes); 3628 tbytes += nbytes;
|
/PHP-7.2/ext/odbc/ |
H A D | php_odbc.c | 1459 int fp, nbytes; in PHP_FUNCTION() local 1463 while ((nbytes = read(fp, &buf, 4096)) > 0) { in PHP_FUNCTION() 1464 SQLPutData(result->stmt, (void*)&buf, nbytes); in PHP_FUNCTION()
|
/PHP-7.2/ext/standard/ |
H A D | basic_functions.c | 4779 size_t nbytes; local 4799 nbytes = php_stream_write(stream, message, message_len); 4801 if (nbytes != message_len) {
|