/third_party/libcoap/src/oscore/ |
H A D | oscore_cbor.c | 211 get_byte(const uint8_t **buffer, size_t *buf_len) { in get_byte() argument 213 (void)buf_len; in get_byte() 215 assert((*buf_len) > 0); in get_byte() 220 get_byte_inc(const uint8_t **buffer, size_t *buf_len) { in get_byte_inc() argument 221 assert((*buf_len) > 0); in get_byte_inc() 222 (*buf_len)--; in get_byte_inc() 227 oscore_cbor_get_next_element(const uint8_t **buffer, size_t *buf_len) { in oscore_cbor_get_next_element() argument 228 uint8_t element = get_byte(buffer, buf_len); in oscore_cbor_get_next_element() 240 oscore_cbor_get_element_size(const uint8_t **buffer, size_t *buf_len) { in oscore_cbor_get_element_size() argument 241 uint8_t control = get_byte(buffer, buf_len) in oscore_cbor_get_element_size() 260 oscore_cbor_elem_contained(const uint8_t *data, size_t *buf_len, uint8_t *end) oscore_cbor_elem_contained() argument 271 oscore_cbor_get_negative_integer(const uint8_t **buffer, size_t *buf_len) oscore_cbor_get_negative_integer() argument 276 oscore_cbor_get_unsigned_integer(const uint8_t **buffer, size_t *buf_len) oscore_cbor_get_unsigned_integer() argument 287 oscore_cbor_get_number(const uint8_t **data, size_t *buf_len, int64_t *value) oscore_cbor_get_number() argument 306 oscore_cbor_get_simple_value(const uint8_t **data, size_t *buf_len, uint8_t *value) oscore_cbor_get_simple_value() argument 316 oscore_cbor_get_string(const uint8_t **buffer, size_t *buf_len, char *str, size_t size) oscore_cbor_get_string() argument 324 oscore_cbor_get_array(const uint8_t **buffer, size_t *buf_len, uint8_t *arr, size_t size) oscore_cbor_get_array() argument 335 oscore_cbor_get_string_array(const uint8_t **data, size_t *buf_len, uint8_t **result, size_t *len) oscore_cbor_get_string_array() argument 361 oscore_cbor_skip_value(const uint8_t **data, size_t *buf_len) oscore_cbor_skip_value() argument 421 oscore_cbor_strip_value(const uint8_t **data, size_t *buf_len, uint8_t **result, size_t *len) oscore_cbor_strip_value() argument [all...] |
/third_party/node/deps/openssl/openssl/crypto/evp/ |
H A D | bio_b64.c | 34 int buf_len; member 127 ctx->buf_len = 0; in b64_read() 134 if (ctx->buf_len > 0) { in b64_read() 135 OPENSSL_assert(ctx->buf_len >= ctx->buf_off); in b64_read() 136 i = ctx->buf_len - ctx->buf_off; in b64_read() 145 if (ctx->buf_len == ctx->buf_off) { in b64_read() 146 ctx->buf_len = 0; in b64_read() 280 ctx->buf_len = 0; in b64_read() 282 ctx->buf_len = z; in b64_read() 287 (unsigned char *)ctx->buf, &ctx->buf_len, in b64_read() [all...] |
H A D | bio_ok.c | 99 size_t buf_len; member 189 i = ctx->buf_len - ctx->buf_off; in ok_read() 199 if (ctx->buf_len == ctx->buf_off) { in ok_read() 206 ctx->buf_len = ctx->buf_len_save - ctx->buf_off_save; in ok_read() 208 ctx->buf_len); in ok_read() 210 ctx->buf_len = 0; in ok_read() 221 n = IOBS - ctx->buf_len; in ok_read() 222 i = BIO_read(next, &(ctx->buf[ctx->buf_len]), n); in ok_read() 227 ctx->buf_len += i; in ok_read() 277 n = ctx->buf_len in ok_write() [all...] |
H A D | bio_enc.c | 30 int buf_len; member 121 if (ctx->buf_len > 0) { in enc_read() 122 i = ctx->buf_len - ctx->buf_off; in enc_read() 130 if (ctx->buf_len == ctx->buf_off) { in enc_read() 131 ctx->buf_len = 0; in enc_read() 163 ctx->buf, &(ctx->buf_len)); in enc_read() 177 int j = outl - blocksize, buf_len; in enc_read() local 180 (unsigned char *)out, &buf_len, in enc_read() 185 ret += buf_len; in enc_read() 186 out += buf_len; in enc_read() [all...] |
/third_party/openssl/crypto/evp/ |
H A D | bio_b64.c | 34 int buf_len; member 127 ctx->buf_len = 0; in b64_read() 134 if (ctx->buf_len > 0) { in b64_read() 135 OPENSSL_assert(ctx->buf_len >= ctx->buf_off); in b64_read() 136 i = ctx->buf_len - ctx->buf_off; in b64_read() 145 if (ctx->buf_len == ctx->buf_off) { in b64_read() 146 ctx->buf_len = 0; in b64_read() 280 ctx->buf_len = 0; in b64_read() 282 ctx->buf_len = z; in b64_read() 287 (unsigned char *)ctx->buf, &ctx->buf_len, in b64_read() [all...] |
H A D | bio_ok.c | 99 size_t buf_len; member 189 i = ctx->buf_len - ctx->buf_off; in ok_read() 199 if (ctx->buf_len == ctx->buf_off) { in ok_read() 206 ctx->buf_len = ctx->buf_len_save - ctx->buf_off_save; in ok_read() 208 ctx->buf_len); in ok_read() 210 ctx->buf_len = 0; in ok_read() 221 n = IOBS - ctx->buf_len; in ok_read() 222 i = BIO_read(next, &(ctx->buf[ctx->buf_len]), n); in ok_read() 227 ctx->buf_len += i; in ok_read() 277 n = ctx->buf_len in ok_write() [all...] |
H A D | bio_enc.c | 30 int buf_len; member 121 if (ctx->buf_len > 0) { in enc_read() 122 i = ctx->buf_len - ctx->buf_off; in enc_read() 130 if (ctx->buf_len == ctx->buf_off) { in enc_read() 131 ctx->buf_len = 0; in enc_read() 163 ctx->buf, &(ctx->buf_len)); in enc_read() 177 int j = outl - blocksize, buf_len; in enc_read() local 180 (unsigned char *)out, &buf_len, in enc_read() 185 ret += buf_len; in enc_read() 186 out += buf_len; in enc_read() [all...] |
/third_party/ltp/testcases/kernel/sched/nptl/ |
H A D | nptl01.c | 72 void call_mutex_init(pthread_mutex_t * mutex, char *buf, size_t buf_len) in call_mutex_init() argument 78 strerror_r(ret, buf, buf_len)); in call_mutex_init() 82 void call_mutex_lock(pthread_mutex_t * mutex, char *buf, size_t buf_len) in call_mutex_lock() argument 88 strerror_r(ret, buf, buf_len)); in call_mutex_lock() 92 void call_mutex_unlock(pthread_mutex_t * mutex, char *buf, size_t buf_len) in call_mutex_unlock() argument 98 strerror_r(ret, buf, buf_len)); in call_mutex_unlock() 102 void call_cond_init(pthread_cond_t * cond, char *buf, size_t buf_len) in call_cond_init() argument 108 strerror_r(ret, buf, buf_len)); in call_cond_init() 113 char *buf, size_t buf_len) in call_cond_wait() 119 strerror_r(ret, buf, buf_len)); in call_cond_wait() 112 call_cond_wait(pthread_cond_t * cond, pthread_mutex_t * mutex, char *buf, size_t buf_len) call_cond_wait() argument 123 call_cond_signal(pthread_cond_t * cond, char *buf, size_t buf_len) call_cond_signal() argument 133 do_timedwait(pthread_cond_t * cond, pthread_mutex_t * mutex, char *buf, size_t buf_len, int i) do_timedwait() argument 185 create_child_thread(char *buf, size_t buf_len) create_child_thread() argument [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/crypto/ |
H A D | aes-eax.c | 33 size_t buf_len; in aes_128_eax_encrypt() local 39 buf_len = nonce_len; in aes_128_eax_encrypt() 41 buf_len = data_len; in aes_128_eax_encrypt() 42 if (hdr_len > buf_len) in aes_128_eax_encrypt() 43 buf_len = hdr_len; in aes_128_eax_encrypt() 44 buf_len += 16; in aes_128_eax_encrypt() 46 buf = os_malloc(buf_len); in aes_128_eax_encrypt() 74 bin_clear_free(buf, buf_len); in aes_128_eax_encrypt() 97 size_t buf_len; in aes_128_eax_decrypt() local 103 buf_len in aes_128_eax_decrypt() [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/crypto/ |
H A D | aes-eax.c | 33 size_t buf_len; in aes_128_eax_encrypt() local 39 buf_len = nonce_len; in aes_128_eax_encrypt() 41 buf_len = data_len; in aes_128_eax_encrypt() 42 if (hdr_len > buf_len) in aes_128_eax_encrypt() 43 buf_len = hdr_len; in aes_128_eax_encrypt() 44 buf_len += 16; in aes_128_eax_encrypt() 46 buf = os_malloc(buf_len); in aes_128_eax_encrypt() 74 bin_clear_free(buf, buf_len); in aes_128_eax_encrypt() 97 size_t buf_len; in aes_128_eax_decrypt() local 103 buf_len in aes_128_eax_decrypt() [all...] |
/third_party/node/deps/openssl/openssl/crypto/ec/ |
H A D | ec_deprecated.c | 26 size_t buf_len = 0; in EC_POINT_point2bn() local 29 buf_len = EC_POINT_point2buf(group, point, form, &buf, ctx); in EC_POINT_point2bn() 31 if (buf_len == 0) in EC_POINT_point2bn() 34 ret = BN_bin2bn(buf, buf_len, ret); in EC_POINT_point2bn() 44 size_t buf_len = 0; in EC_POINT_bn2point() local 48 if ((buf_len = BN_num_bytes(bn)) == 0) in EC_POINT_bn2point() 49 buf_len = 1; in EC_POINT_bn2point() 50 if ((buf = OPENSSL_malloc(buf_len)) == NULL) { in EC_POINT_bn2point() 55 if (BN_bn2binpad(bn, buf, buf_len) < 0) { in EC_POINT_bn2point() 68 if (!EC_POINT_oct2point(group, ret, buf, buf_len, ct in EC_POINT_bn2point() [all...] |
/third_party/openssl/crypto/ec/ |
H A D | ec_deprecated.c | 26 size_t buf_len = 0; in EC_POINT_point2bn() local 29 buf_len = EC_POINT_point2buf(group, point, form, &buf, ctx); in EC_POINT_point2bn() 31 if (buf_len == 0) in EC_POINT_point2bn() 34 ret = BN_bin2bn(buf, buf_len, ret); in EC_POINT_point2bn() 44 size_t buf_len = 0; in EC_POINT_bn2point() local 48 if ((buf_len = BN_num_bytes(bn)) == 0) in EC_POINT_bn2point() 49 buf_len = 1; in EC_POINT_bn2point() 50 if ((buf = OPENSSL_malloc(buf_len)) == NULL) { in EC_POINT_bn2point() 55 if (BN_bn2binpad(bn, buf, buf_len) < 0) { in EC_POINT_bn2point() 68 if (!EC_POINT_oct2point(group, ret, buf, buf_len, ct in EC_POINT_bn2point() [all...] |
/third_party/libcoap/src/ |
H A D | coap_debug.c | 714 size_t buf_len = 0; /* takes the number of bytes written to buf */ in coap_show_pdu() local 778 buf_len = snprintf((char *)buf, sizeof(buf), "%u", in coap_show_pdu() 783 buf_len = 0; in coap_show_pdu() 788 buf_len = 0; in coap_show_pdu() 792 buf_len = print_readable(coap_opt_value(option), in coap_show_pdu() 797 buf_len = snprintf((char *)buf, sizeof(buf), "%u", in coap_show_pdu() 802 buf_len = 0; in coap_show_pdu() 808 buf_len = snprintf((char *)buf, sizeof(buf), "%u", in coap_show_pdu() 813 buf_len = 0; in coap_show_pdu() 823 buf_len in coap_show_pdu() [all...] |
/third_party/mbedtls/library/ |
H A D | platform.c | 296 int mbedtls_platform_std_nv_seed_read(unsigned char *buf, size_t buf_len) in mbedtls_platform_std_nv_seed_read() argument 308 if ((n = fread(buf, 1, buf_len, file)) != buf_len) { in mbedtls_platform_std_nv_seed_read() 310 mbedtls_platform_zeroize(buf, buf_len); in mbedtls_platform_std_nv_seed_read() 318 int mbedtls_platform_std_nv_seed_write(unsigned char *buf, size_t buf_len) in mbedtls_platform_std_nv_seed_write() argument 330 if ((n = fwrite(buf, 1, buf_len, file)) != buf_len) { in mbedtls_platform_std_nv_seed_write() 345 static int platform_nv_seed_read_uninit(unsigned char *buf, size_t buf_len) in platform_nv_seed_read_uninit() argument 348 ((void) buf_len); in platform_nv_seed_read_uninit() 359 static int platform_nv_seed_write_uninit(unsigned char *buf, size_t buf_len) in platform_nv_seed_write_uninit() argument 374 mbedtls_platform_set_nv_seed( int (*nv_seed_read_func)(unsigned char *buf, size_t buf_len), int (*nv_seed_write_func)(unsigned char *buf, size_t buf_len)) mbedtls_platform_set_nv_seed() argument [all...] |
/third_party/libunwind/libunwind/src/mi/ |
H A D | Gget_proc_name.c | 31 unw_word_t addr, char *buf, size_t buf_len, void *arg) in intern_string() 36 for (i = 0; i < buf_len; ++i) in intern_string() 44 buf[buf_len - 1] = '\0'; /* ensure string is NUL terminated */ in intern_string() 50 char *buf, size_t buf_len, unw_word_t *offp, void *arg) in get_proc_name() 69 ret = intern_string (as, a, di->u.pi.name_ptr, buf, buf_len, arg); in get_proc_name() 93 return (*a->get_proc_name) (as, ip, buf, buf_len, offp, arg); in get_proc_name() 99 unw_get_proc_name (unw_cursor_t *cursor, char *buf, size_t buf_len, in unw_get_proc_name() argument 119 error = get_proc_name (tdep_get_as (c), ip, buf, buf_len, offp, in unw_get_proc_name() 30 intern_string(unw_addr_space_t as, unw_accessors_t *a, unw_word_t addr, char *buf, size_t buf_len, void *arg) intern_string() argument 49 get_proc_name(unw_addr_space_t as, unw_word_t ip, char *buf, size_t buf_len, unw_word_t *offp, void *arg) get_proc_name() argument
|
/third_party/ltp/lib/ |
H A D | get_path.c | 53 int tst_get_path(const char *prog_name, char *buf, size_t buf_len) in tst_get_path() argument 67 snprintf(buf, MIN(buf_len, (size_t) (end - start + 1)), in tst_get_path() 70 snprintf(buf, buf_len, "%s", start); in tst_get_path() 79 snprintf(buf, buf_len, "."); in tst_get_path() 88 snprintf(buf + size, buf_len - size, "/%s", in tst_get_path() 92 snprintf(buf + size, buf_len - size, "%s", in tst_get_path() 95 if (buf_len - size > ret && file_exist(buf)) in tst_get_path()
|
/third_party/python/Lib/asyncio/ |
H A D | protocols.py | 204 buf_len = len(buf) 205 if not buf_len: 208 if buf_len >= data_len: 213 buf[:buf_len] = data[:buf_len] 214 proto.buffer_updated(buf_len) 215 data = data[buf_len:]
|
/third_party/lwip/src/core/distributed_net/ |
H A D | distributed_net_core.c | 104 ssize_t distributed_net_sendto(int sock, const void *buf, size_t buf_len, int flags, const struct sockaddr *addr, in distributed_net_sendto() argument 109 CHECK_PARA(buf_len > 0, EINVAL); in distributed_net_sendto() 118 return lwip_sendto_internal(sock, buf, buf_len, flags, addr, addr_len); in distributed_net_sendto() 133 return lwip_sendto_internal(sock, buf, buf_len, flags, addr, addr_len); in distributed_net_sendto() 141 ssize_t ret = udp_transmit_sendto(sock, buf, buf_len, &addr_in); in distributed_net_sendto() 191 ssize_t distributed_net_recvfrom(int sock, void *buf, size_t buf_len, int flags, struct sockaddr *from, in distributed_net_recvfrom() argument 196 CHECK_PARA(buf_len > 0, EINVAL); in distributed_net_recvfrom() 205 return lwip_recvfrom_internal(sock, buf, buf_len, flags, from, from_len); in distributed_net_recvfrom() 208 size_t new_buf_len = buf_len + sizeof(udp_data); in distributed_net_recvfrom() 225 (void)memcpy_s(buf, buf_len, new_bu in distributed_net_recvfrom() [all...] |
/third_party/lwip/src/netif/ppp/ |
H A D | magic.c | 162 void magic_random_bytes(unsigned char *buf, u32_t buf_len) { in magic_random_bytes() argument 167 while (buf_len > 0) { in magic_random_bytes() 175 n = LWIP_MIN(buf_len, MD5_HASH_SIZE); in magic_random_bytes() 178 buf_len -= n; in magic_random_bytes() 274 void magic_random_bytes(unsigned char *buf, u32_t buf_len) { in magic_random_bytes() argument 277 while (buf_len > 0) { in magic_random_bytes() 279 n = LWIP_MIN(buf_len, sizeof(new_rand)); in magic_random_bytes() 282 buf_len -= n; in magic_random_bytes()
|
/third_party/selinux/libselinux/src/ |
H A D | label_support.c | 151 * @buf_len: length of buffer to copy. 157 char *from_addr, size_t buf_len, in digest_add_specfile() 166 if (digest->hashbuf_size + buf_len < digest->hashbuf_size) { in digest_add_specfile() 170 digest->hashbuf_size += buf_len; in digest_add_specfile() 180 if (fread(digest->hashbuf + (digest->hashbuf_size - buf_len), in digest_add_specfile() 181 1, buf_len, fp) != buf_len) in digest_add_specfile() 187 (digest->hashbuf_size - buf_len), in digest_add_specfile() 188 from_addr, buf_len); in digest_add_specfile() 156 digest_add_specfile(struct selabel_digest *digest, FILE *fp, char *from_addr, size_t buf_len, const char *path) digest_add_specfile() argument
|
/third_party/libwebsockets/minimal-examples/api-tests/api-test-lecp/ |
H A D | main.c | 1029 size_t buf_len; member 2055 { .reason = LECPCB_VAL_BLOB_END, .buf = bm12, .buf_len = sizeof(bm12)}, 2066 { .reason = LECPCB_VAL_BLOB_END, .buf = bm12, .buf_len = sizeof(bm12)}, 2241 { .reason = LECPCB_VAL_STR_END, .buf = bm48, .buf_len = sizeof(bm48)}, 2260 { .reason = LECPCB_VAL_BLOB_END, .buf = bm51, .buf_len = sizeof(bm51)}, 2267 { .reason = LECPCB_VAL_BLOB_END, .buf = bm52, .buf_len = sizeof(bm52)}, 2274 { .reason = LECPCB_VAL_STR_END, .buf = bm53, .buf_len = sizeof(bm53)}, 2280 { .reason = LECPCB_VAL_BLOB_END, .buf = bm53, .buf_len = 0}, 2285 { .reason = LECPCB_VAL_BLOB_END, .buf = bm51, .buf_len = sizeof(bm51)}, 2290 { .reason = LECPCB_VAL_STR_END, .buf = bm53, .buf_len [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/eap_peer/ |
H A D | eap_fast_pac.c | 185 size_t buf_len; member 194 if (fgets(rc->buf, rc->buf_len, rc->f) == NULL) in eap_fast_read_line() 205 if (len >= rc->buf_len) in eap_fast_read_line() 206 len = rc->buf_len - 1; in eap_fast_read_line() 212 rc->buf[rc->buf_len - 1] = '\0'; in eap_fast_read_line() 258 rc->buf_len = 2048; in eap_fast_init_pac_data() 259 rc->buf = os_malloc(rc->buf_len); in eap_fast_init_pac_data() 477 static void eap_fast_write(char **buf, char **pos, size_t *buf_len, in eap_fast_write() argument 493 if (*pos - *buf + need > *buf_len) { in eap_fast_write() 494 char *nbuf = os_realloc(*buf, *buf_len in eap_fast_write() 574 eap_fast_add_pac_data(struct eap_fast_pac *pac, char **buf, char **pos, size_t *buf_len) eap_fast_add_pac_data() argument 624 size_t buf_len; eap_fast_save_pac() local [all...] |
H A D | eap_teap_pac.c | 185 size_t buf_len; member 194 if (fgets(rc->buf, rc->buf_len, rc->f) == NULL) in eap_teap_read_line() 206 if (len >= rc->buf_len) in eap_teap_read_line() 207 len = rc->buf_len - 1; in eap_teap_read_line() 213 rc->buf[rc->buf_len - 1] = '\0'; in eap_teap_read_line() 259 rc->buf_len = 2048; in eap_teap_init_pac_data() 260 rc->buf = os_malloc(rc->buf_len); in eap_teap_init_pac_data() 478 static void eap_teap_write(char **buf, char **pos, size_t *buf_len, in eap_teap_write() argument 493 if (*pos - *buf + need > *buf_len) { in eap_teap_write() 494 char *nbuf = os_realloc(*buf, *buf_len in eap_teap_write() 579 eap_teap_add_pac_data(struct eap_teap_pac *pac, char **buf, char **pos, size_t *buf_len) eap_teap_add_pac_data() argument 628 size_t buf_len; eap_teap_save_pac() local [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/eap_peer/ |
H A D | eap_fast_pac.c | 185 size_t buf_len; member 194 if (fgets(rc->buf, rc->buf_len, rc->f) == NULL) in eap_fast_read_line() 205 if (len >= rc->buf_len) in eap_fast_read_line() 206 len = rc->buf_len - 1; in eap_fast_read_line() 212 rc->buf[rc->buf_len - 1] = '\0'; in eap_fast_read_line() 258 rc->buf_len = 2048; in eap_fast_init_pac_data() 259 rc->buf = os_malloc(rc->buf_len); in eap_fast_init_pac_data() 477 static void eap_fast_write(char **buf, char **pos, size_t *buf_len, in eap_fast_write() argument 493 if (*pos - *buf + need > *buf_len) { in eap_fast_write() 494 char *nbuf = os_realloc(*buf, *buf_len in eap_fast_write() 574 eap_fast_add_pac_data(struct eap_fast_pac *pac, char **buf, char **pos, size_t *buf_len) eap_fast_add_pac_data() argument 624 size_t buf_len; eap_fast_save_pac() local [all...] |
H A D | eap_teap_pac.c | 185 size_t buf_len; member 194 if (fgets(rc->buf, rc->buf_len, rc->f) == NULL) in eap_teap_read_line() 206 if (len >= rc->buf_len) in eap_teap_read_line() 207 len = rc->buf_len - 1; in eap_teap_read_line() 213 rc->buf[rc->buf_len - 1] = '\0'; in eap_teap_read_line() 259 rc->buf_len = 2048; in eap_teap_init_pac_data() 260 rc->buf = os_malloc(rc->buf_len); in eap_teap_init_pac_data() 478 static void eap_teap_write(char **buf, char **pos, size_t *buf_len, in eap_teap_write() argument 493 if (*pos - *buf + need > *buf_len) { in eap_teap_write() 494 char *nbuf = os_realloc(*buf, *buf_len in eap_teap_write() 579 eap_teap_add_pac_data(struct eap_teap_pac *pac, char **buf, char **pos, size_t *buf_len) eap_teap_add_pac_data() argument 628 size_t buf_len; eap_teap_save_pac() local [all...] |