| /lighttpd1.4/src/ |
| H A D | fdevent.c | 512 return read(fd, buf, sz); in fdevent_socket_read_discard() 610 off_t sz = 0; in fdevent_load_file() local 624 sz = st.st_size; in fdevent_load_file() 628 if (sz) { in fdevent_load_file() 632 rd = read(fd, buf+off, (size_t)(sz-off)); in fdevent_load_file() 634 if (off != sz) { /*(file truncated?)*/ in fdevent_load_file() 640 buf[sz] = '\0'; in fdevent_load_file() 641 *lim = sz; in fdevent_load_file() 650 ck_memzero(buf, (size_t)sz); in fdevent_load_file() 672 rd = read(fd, buf+off, (size_t)(sz-off)); in fdevent_load_file_bytes() [all …]
|
| H A D | mod_magnet_cache.c | 63 const off_t sz = sce->st.st_size; in script_cache_load_script() local 64 char * const buf = ck_malloc(sz+1); in script_cache_load_script() 69 rd = read(sce->fd, buf+off, (size_t)(sz-off)); in script_cache_load_script() 70 } while (rd > 0 ? (off += rd) != sz : rd < 0 && errno == EINTR); in script_cache_load_script() 71 if (off != sz) { /*(file truncated?)*/ in script_cache_load_script() 78 buf[sz] = '\0'; /* for strstr() */ in script_cache_load_script() 81 int rc = luaL_loadbuffer(sc->L, buf, (size_t)sz, sc->name.ptr); in script_cache_load_script()
|
| H A D | chunk.c | 77 chunk_buf_sz = sz > 0 ? x : 8192; in chunkqueue_set_chunk_size() 251 if (tb && tb->size < sz) { in chunk_push_oversized() 265 if (sz <= (chunk_buf_sz|1)) { in chunk_buffer_acquire_sz() 345 if (sz <= (chunk_buf_sz|1)) { in chunk_acquire() 351 sz = chunk_buf_sz; in chunk_acquire() 355 sz = (sz + (chunk_buf_sz-1)) & ~(chunk_buf_sz-1); in chunk_acquire() 360 return chunk_init_sz(sz); in chunk_acquire() 365 if (sz == (chunk_buf_sz|1)) { in chunk_release() 370 else if (sz > chunk_buf_sz) { in chunk_release() 465 chunk *c = chunk_acquire(sz); in chunkqueue_prepend_mem_chunk() [all …]
|
| H A D | buffer.c | 52 force_assert(sz > len); in __attribute_nonnull__() 53 if ((sz & (sz-1)) && sz < INT_MAX) {/* not power-2; huge val not expected */ in __attribute_nonnull__() 55 const size_t psz = sz; in __attribute_nonnull__() 56 for (sz = 256; sz < psz; sz <<= 1) ; in __attribute_nonnull__() 60 b->size = sz; in __attribute_nonnull__() 148 size_t sz = b->used; in buffer_commit() local 149 if (0 == sz) sz = 1; in buffer_commit() 153 sz += size; in buffer_commit() 154 force_assert(sz > size); in buffer_commit() 157 b->used = sz; in buffer_commit() [all …]
|
| H A D | http_chunk.c | 129 …chunk_append_file_fd(request_st * const r, const buffer * const fn, const int fd, const off_t sz) { in http_chunk_append_file_fd() argument 130 if (sz > 32768 || !r->resp_send_chunked) { in http_chunk_append_file_fd() 131 http_chunk_append_file_fd_range(r, fn, fd, 0, sz); in http_chunk_append_file_fd() 136 int rc = (0 != sz) ? http_chunk_append_read_fd_range(r,fn,fd,0,sz) : 0; in http_chunk_append_file_fd() 142 const off_t sz = sce->st.st_size; in http_chunk_append_file_ref() local 143 if (sz > 32768 || !r->resp_send_chunked) { in http_chunk_append_file_ref() 144 http_chunk_append_file_ref_range(r, sce, 0, sz); in http_chunk_append_file_ref() 151 int rc = (0 != sz) ? http_chunk_append_read_fd_range(r,fn,fd,0,sz) : 0; in http_chunk_append_file_ref()
|
| H A D | mod_authn_sasl.c | 213 size_t sz; in mod_authn_sasl_cb_getopt() local 217 sz = buffer_clen(p->conf.pwcheck_method); in mod_authn_sasl_cb_getopt() 221 sz = buffer_clen(p->conf.sasldb_path); in mod_authn_sasl_cb_getopt() 225 sz = sizeof("sasldb")-1; in mod_authn_sasl_cb_getopt() 232 if (len) *len = (unsigned int)sz; in mod_authn_sasl_cb_getopt()
|
| H A D | chunk.h | 67 size_t chunk_buffer_prepare_append (buffer *b, size_t sz); 76 void chunkqueue_set_chunk_size (size_t sz); 98 buffer * chunkqueue_prepend_buffer_open_sz(chunkqueue *cq, size_t sz); 106 buffer * chunkqueue_append_buffer_open_sz(chunkqueue *cq, size_t sz);
|
| H A D | mod_extforward.c | 1325 size_t sz; in hap_PROXY_recv() local 1344 sz = 16 + (size_t)ntohs(hdr->v2.len); in hap_PROXY_recv() 1345 if ((size_t)ret < sz) in hap_PROXY_recv() 1359 sz = (size_t)(end + 2 - hdr->v1.line); /* skip header + CRLF */ in hap_PROXY_recv() 1373 ret = recv(fd, hdr, sz, MSG_TRUNC|MSG_DONTWAIT|MSG_NOSIGNAL); in hap_PROXY_recv() 1377 ret = recv(fd, hdr, sz, MSG_DONTWAIT|MSG_NOSIGNAL); in hap_PROXY_recv() 1380 if (ret != (ssize_t)sz) { in hap_PROXY_recv() 1512 uint32_t sz = ntohs(hdr->v2.len); in mod_extforward_hap_PROXY_v2() local 1578 if (3 + len > sz) return 0; in mod_extforward_hap_PROXY_v2() 1583 for (sz -= len, len -= 3; sz >= 3; sz -= 3 + len) { in mod_extforward_hap_PROXY_v2() [all …]
|
| H A D | fdevent.h | 105 ssize_t fdevent_socket_read_discard (int fd, char *buf, size_t sz, int family, int so_type); 119 int fdevent_load_file_bytes (char *buf, off_t sz, off_t off, const char *fn, log_error_st *errh);
|
| H A D | mod_evhost.c | 79 const uint32_t sz = 127;/* (sz+1 must match bptr[] num elts below) */ in mod_evhost_parse_pattern() local 87 if (used >= sz-1) /* (should not happen) */ in mod_evhost_parse_pattern() 122 if (used >= sz) /* (should not happen) */ in mod_evhost_parse_pattern()
|
| H A D | http_date.h | 21 uint32_t http_date_time_to_str (char *s, size_t sz, unix_time64_t t);
|
| H A D | mod_deflate.c | 1466 size_t sz = buffer_string_space(addrb)+1; in mod_deflate_using_libdeflate_sm() local 1467 sz = (hctx->compression_type == HTTP_ACCEPT_ENCODING_GZIP) in mod_deflate_using_libdeflate_sm() 1468 ? libdeflate_gzip_compress(compressor, in, in_nbytes, addrb->ptr, sz) in mod_deflate_using_libdeflate_sm() 1469 : libdeflate_zlib_compress(compressor, in, in_nbytes, addrb->ptr, sz); in mod_deflate_using_libdeflate_sm() 1472 if (0 == sz) { in mod_deflate_using_libdeflate_sm() 1478 hctx->bytes_out = (off_t)sz; in mod_deflate_using_libdeflate_sm() 1479 if (0 != stream_http_chunk_append_mem(hctx, addrb->ptr, sz)) in mod_deflate_using_libdeflate_sm() 1530 const size_t sz = in mod_deflate_using_libdeflate() local 1534 if (0 != ftruncate(fd, (off_t)sz)) { in mod_deflate_using_libdeflate() 1540 void * const addr = mmap(NULL, sz, PROT_WRITE, MAP_SHARED, fd, 0); in mod_deflate_using_libdeflate() [all …]
|
| H A D | http_chunk.h | 16 int http_chunk_append_file_fd(request_st *r, const buffer *fn, int fd, off_t sz);
|
| H A D | http_date.c | 268 http_date_time_to_str (char * const s, const size_t sz, const unix_time64_t t) in http_date_time_to_str() argument 274 ? (uint32_t)strftime(s, sz, fmt, &tm) in http_date_time_to_str()
|
| H A D | sock_addr.h | 59 …st char * sock_addr_inet_ntop(const sock_addr * restrict saddr, char * restrict buf, socklen_t sz);
|
| H A D | array.c | 131 const uint32_t sz = a->size; in array_free_data() local 132 for (uint32_t i = 0; i < sz; ++i) { in array_free_data() 331 for (uint32_t i = a->used, sz = a->size; i < sz; ++i) { in array_get_unused_element()
|
| H A D | sock_addr.c | 284 …ock_addr_inet_ntop(const sock_addr * const restrict saddr, char * const restrict buf, socklen_t sz) in sock_addr_inet_ntop() argument 289 return inet_ntop(AF_INET,(const void *)&saddr->ipv4.sin_addr,buf,sz); in sock_addr_inet_ntop() 295 return inet_ntop(AF_INET6,(const void *)&saddr->ipv6.sin6_addr,buf,sz); in sock_addr_inet_ntop()
|
| H A D | mod_rrdtool.c | 246 static ssize_t safe_read(int fd, char *buf, size_t sz) { in safe_read() argument 250 res = read(fd, buf, sz-1); in safe_read()
|
| H A D | mod_accesslog.c | 195 const uint32_t sz = 127;/* (sz+1 must match fptr[] num elts below) */ in accesslog_parse_format() local 210 if (used == sz) in accesslog_parse_format() 227 if (used == sz) in accesslog_parse_format()
|
| H A D | mod_wolfssl.c | 101 #define wolfSSL_OPENSSL_cleanse(x,sz) ck_memzero((x),(sz)) argument 253 #define RAND_priv_bytes(x,sz) RAND_bytes((x),(sz)) in mod_openssl_session_ticket_key_generate() argument 1111 safer_X509_NAME_oneline(X509_NAME *name, char *buf, size_t sz) in safer_X509_NAME_oneline() argument 1115 UNUSED(sz); in safer_X509_NAME_oneline() 1117 if (wolfSSL_X509_get_name_oneline(name, buf, (int)sz)) in safer_X509_NAME_oneline()
|
| H A D | mod_gnutls.c | 2806 size_t sz = msg.size-1; /* '\0'-terminated string */ in https_add_ssl_client_verify_err() local 2808 nl[0] = ('\0' == nl[1] ? (--sz, '\0') : ':'); in https_add_ssl_client_verify_err() 2809 buffer_append_string_len(b, (char *)msg.data, sz); in https_add_ssl_client_verify_err() 2874 size_t sz = sizeof(buf); in https_add_ssl_client_entries() local 2875 if (gnutls_x509_crt_get_serial(crt, buf, &sz) >= 0) in https_add_ssl_client_entries() 2878 buf, sz); in https_add_ssl_client_entries()
|
| H A D | lemon.c | 3184 int sz; in file_makename() local 3190 sz = lemonStrlen(filename); in file_makename() 3191 sz += lemonStrlen(suffix); in file_makename() 3192 if( outputDir ) sz += lemonStrlen(outputDir) + 1; in file_makename() 3193 sz += 5; in file_makename() 3194 name = (char*)malloc( sz ); in file_makename() 4299 int i, j, n, sz; in ReportTable() local 4678 minimum_size_type(mnTknOfst, lemp->nterminal+lemp->nactiontab, &sz)); in ReportTable() 4680 lemp->tablesize += n*sz; in ReportTable() 4704 minimum_size_type(mnNtOfst-1, mxNtOfst, &sz)); lineno++; in ReportTable() [all …]
|
| H A D | configfile.c | 2274 static char* getCWD(char *buf, size_t sz) { in getCWD() argument 2275 if (NULL == getcwd(buf, sz)) { in getCWD() 2284 #define getcwd(buf, sz) getCWD((buf),(sz)) argument
|
| H A D | mod_magnet.c | 186 #define lua_newuserdata0(L, sz) lua_newuserdata((L),(sz)) argument 188 #define lua_newuserdata0(L, sz) lua_newuserdatauv((L),(sz),0) argument
|
| /lighttpd1.4/tests/ |
| H A D | fcgi-responder.c | 293 fcgi_recv_packet (FILE * const stream, ssize_t sz) in fcgi_recv_packet() argument 296 while (sz - offset >= (ssize_t)FCGI_HEADER_LEN) { in fcgi_recv_packet() 300 if (sz - offset < (ssize_t)(FCGI_HEADER_LEN + len + pad)) in fcgi_recv_packet()
|