Home
last modified time | relevance | path

Searched refs:buf_len (Results 1 – 25 of 164) sorted by relevance

1234567

/external/compiler-rt/test/sanitizer_common/TestCases/Linux/
Dopen_memstream.cc30 size_t buf_len; in run() local
31 fprintf(stderr, " &buf %p, &buf_len %p\n", &buf, &buf_len); in run()
32 FILE *fp = open_memstream(&buf, &buf_len); in run()
37 check_mem_is_good(&buf_len, sizeof(buf_len)); in run()
38 check_mem_is_good(buf, buf_len); in run()
50 fprintf(stderr, " %p addr %p, len %zu\n", &buf, buf, buf_len); in run()
52 check_mem_is_good(&buf_len, sizeof(buf_len)); in run()
53 check_mem_is_good(buf, buf_len);\ in run()
58 check_mem_is_good(&buf_len, sizeof(buf_len)); in run()
59 check_mem_is_good(buf, buf_len); in run()
/external/boringssl/src/decrepit/bio/
Dbase64_bio.c77 int buf_len; member
136 ctx->buf_len = 0; in b64_read()
143 if (ctx->buf_len > 0) { in b64_read()
144 assert(ctx->buf_len >= ctx->buf_off); in b64_read()
145 i = ctx->buf_len - ctx->buf_off; in b64_read()
155 if (ctx->buf_len == ctx->buf_off) { in b64_read()
156 ctx->buf_len = 0; in b64_read()
280 ctx->buf_len = 0; in b64_read()
282 ctx->buf_len = z; in b64_read()
287 &ctx->buf_len, (uint8_t *)ctx->tmp, i); in b64_read()
[all …]
/external/google-breakpad/src/third_party/libdisasm/
Dx86_disasm.c16 unsigned int x86_disasm( unsigned char *buf, unsigned int buf_len, in x86_disasm() argument
22 if ( ! buf || ! insn || ! buf_len ) { in x86_disasm()
36 if ( offset >= buf_len ) { in x86_disasm()
42 len = buf_len - offset; in x86_disasm()
77 unsigned int buf_len, size, count = 0, bytes = 0; in x86_disasm_range() local
80 buf_len = len + offset; in x86_disasm_range()
83 size = x86_disasm( buf, buf_len, buf_rva, offset + bytes, in x86_disasm_range()
127 unsigned int x86_disasm_forward( unsigned char *buf, unsigned int buf_len, in x86_disasm_forward() argument
137 while ( cont && bytes < buf_len ) { in x86_disasm_forward()
138 size = x86_disasm( buf, buf_len, buf_rva, offset + bytes, in x86_disasm_forward()
[all …]
Dia32_modrm.c69 static unsigned int imm32_signsized( unsigned char *buf, size_t buf_len, in imm32_signsized() argument
71 if ( size > buf_len ) { in imm32_signsized()
102 static size_t sib_decode( unsigned char *buf, size_t buf_len, x86_ea_t *ea, in sib_decode() argument
112 if ( buf_len < 1 ) { in sib_decode()
122 imm32_signsized( &buf[1], buf_len, &ea->disp, sizeof(int32_t)); in sib_decode()
143 static size_t modrm_decode16( unsigned char *buf, unsigned int buf_len, in modrm_decode16() argument
187 --buf_len; in modrm_decode16()
190 imm32_signsized( buf, buf_len, &ea->disp, sizeof(char) ); in modrm_decode16()
195 imm32_signsized( buf, buf_len, &ea->disp, sizeof(short) ); in modrm_decode16()
208 size_t ia32_modrm_decode( unsigned char *buf, unsigned int buf_len, in ia32_modrm_decode() argument
[all …]
Dia32_operand.c38 static size_t decode_operand_value( unsigned char *buf, size_t buf_len, in decode_operand_value() argument
68 size = ia32_modrm_decode( buf, buf_len, op, insn, in decode_operand_value()
72 size = ia32_modrm_decode( buf, buf_len, op, insn, in decode_operand_value()
76 size = ia32_modrm_decode( buf, buf_len, op, insn, in decode_operand_value()
80 size = ia32_modrm_decode( buf, buf_len, op, insn, in decode_operand_value()
84 size = ia32_modrm_decode( buf, buf_len, op, insn, in decode_operand_value()
116 x86_imm_sized( buf, buf_len, in decode_operand_value()
119 x86_imm_sized( buf, buf_len, in decode_operand_value()
123 x86_imm_sized( buf, buf_len, in decode_operand_value()
134 x86_imm_signsized(buf, buf_len, &op->data.byte, in decode_operand_value()
[all …]
Dia32_insn.c261 static size_t ia32_decode_insn( unsigned char *buf, size_t buf_len, in ia32_decode_insn() argument
295 modrm = GET_BYTE( buf, buf_len ); in ia32_decode_insn()
306 op_size = ia32_decode_operand( buf, buf_len, insn, raw_insn->dest, in ia32_decode_insn()
310 buf_len -= op_size; in ia32_decode_insn()
313 op_size = ia32_decode_operand( buf, buf_len, insn, raw_insn->src, in ia32_decode_insn()
316 buf_len -= op_size; in ia32_decode_insn()
319 op_size = ia32_decode_operand( buf, buf_len, insn, raw_insn->aux, in ia32_decode_insn()
373 size_t ia32_table_lookup( unsigned char *buf, size_t buf_len, in ia32_table_lookup() argument
383 op = GET_BYTE( buf, buf_len ); in ia32_table_lookup()
445 next_len = buf_len; in ia32_table_lookup()
[all …]
Dx86_imm.c6 unsigned int x86_imm_signsized( unsigned char * buf, size_t buf_len, in x86_imm_signsized() argument
13 if ( size > buf_len ) { in x86_imm_signsized()
38 unsigned int x86_imm_sized( unsigned char * buf, size_t buf_len, void *dest, in x86_imm_sized() argument
45 if ( size > buf_len ) { in x86_imm_sized()
Dia32_invariant.c11 extern size_t ia32_table_lookup( unsigned char *buf, size_t buf_len,
140 static int ia32_decode_invariant( unsigned char *buf, size_t buf_len, argument
279 size_t ia32_disasm_invariant( unsigned char * buf, size_t buf_len, argument
287 size = ia32_table_lookup( buf, buf_len, 0, &raw_insn, &prefixes );
288 if ( size == INVALID_INSN || size > buf_len ) {
302 size += ia32_decode_invariant( buf + size, buf_len - size, raw_insn,
310 size_t ia32_disasm_size( unsigned char *buf, size_t buf_len ) { argument
312 return( ia32_disasm_invariant( buf, buf_len, &inv ) );
/external/wpa_supplicant_8/src/crypto/
Daes-eax.c33 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 = nonce_len; in aes_128_eax_decrypt()
[all …]
Dsha1-tprf.c30 const u8 *seed, size_t seed_len, u8 *buf, size_t buf_len) in sha1_t_prf() argument
51 output_len[0] = (buf_len >> 8) & 0xff; in sha1_t_prf()
52 output_len[1] = buf_len & 0xff; in sha1_t_prf()
54 while (pos < buf_len) { in sha1_t_prf()
56 plen = buf_len - pos; in sha1_t_prf()
Dsha256-prf.c31 const u8 *data, size_t data_len, u8 *buf, size_t buf_len) in sha256_prf() argument
34 buf_len * 8); in sha256_prf()
64 size_t buf_len = (buf_len_bits + 7) / 8; in sha256_prf_bits() local
77 while (pos < buf_len) { in sha256_prf_bits()
78 plen = buf_len - pos; in sha256_prf_bits()
Dsha384-prf.c30 const u8 *data, size_t data_len, u8 *buf, size_t buf_len) in sha384_prf() argument
32 sha384_prf_bits(key, key_len, label, data, data_len, buf, buf_len * 8); in sha384_prf()
61 size_t buf_len = (buf_len_bits + 7) / 8; in sha384_prf_bits() local
74 while (pos < buf_len) { in sha384_prf_bits()
75 plen = buf_len - pos; in sha384_prf_bits()
/external/libbrillo/brillo/
Duserdb_utils.cc20 ssize_t buf_len = sysconf(_SC_GETPW_R_SIZE_MAX); in GetUserInfo() local
21 if (buf_len < 0) in GetUserInfo()
22 buf_len = 16384; // 16K should be enough?... in GetUserInfo()
25 std::vector<char> buf(buf_len); in GetUserInfo()
26 if (getpwnam_r(user.c_str(), &pwd_buf, buf.data(), buf_len, &pwd) || !pwd) { in GetUserInfo()
39 ssize_t buf_len = sysconf(_SC_GETGR_R_SIZE_MAX); in GetGroupInfo() local
40 if (buf_len < 0) in GetGroupInfo()
41 buf_len = 16384; // 16K should be enough?... in GetGroupInfo()
44 std::vector<char> buf(buf_len); in GetGroupInfo()
45 if (getgrnam_r(group.c_str(), &grp_buf, buf.data(), buf_len, &grp) || !grp) { in GetGroupInfo()
/external/libunwind/src/mi/
DGget_proc_name.c31 unw_word_t addr, char *buf, size_t buf_len, void *arg) in intern_string() argument
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() argument
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
104 return get_proc_name (tdep_get_as (c), tdep_get_ip (c), buf, buf_len, offp, in unw_get_proc_name()
111 size_t buf_len, unw_word_t *offp, void *as_arg) in unw_get_proc_name_by_ip() argument
113 return get_proc_name (as, ip, buf, buf_len, offp, as_arg); in unw_get_proc_name_by_ip()
/external/boringssl/src/crypto/bytestring/
Dbytestring_test.cc271 size_t buf_len; in TestCBBBasic() local
286 !CBB_finish(&cbb, &buf, &buf_len)) { in TestCBBBasic()
292 return buf_len == sizeof(kExpected) && memcmp(buf, kExpected, buf_len) == 0; in TestCBBBasic()
344 size_t buf_len; in TestCBBPrefixed() local
364 !CBB_finish(&cbb, &buf, &buf_len)) { in TestCBBPrefixed()
370 return buf_len == sizeof(kExpected) && memcmp(buf, kExpected, buf_len) == 0; in TestCBBPrefixed()
405 size_t buf_len; in TestCBBDiscardChild() local
406 if (!CBB_finish(cbb.get(), &buf, &buf_len)) { in TestCBBDiscardChild()
419 return buf_len == sizeof(kExpected) && memcmp(buf, kExpected, buf_len) == 0; in TestCBBDiscardChild()
425 size_t buf_len; in TestCBBMisuse() local
[all …]
/external/selinux/libselinux/src/
Dlabel_support.c130 char *from_addr, size_t buf_len, in digest_add_specfile() argument
139 if (digest->hashbuf_size + buf_len < digest->hashbuf_size) { in digest_add_specfile()
143 digest->hashbuf_size += buf_len; in digest_add_specfile()
153 if (fread(digest->hashbuf + (digest->hashbuf_size - buf_len), in digest_add_specfile()
154 1, buf_len, fp) != buf_len) in digest_add_specfile()
160 (digest->hashbuf_size - buf_len), in digest_add_specfile()
161 from_addr, buf_len); in digest_add_specfile()
/external/wpa_supplicant_8/src/eap_peer/
Deap_fast_pac.c186 size_t buf_len; member
195 if (fgets(rc->buf, rc->buf_len, rc->f) == NULL) in eap_fast_read_line()
206 if (len >= rc->buf_len) in eap_fast_read_line()
207 len = rc->buf_len - 1; in eap_fast_read_line()
213 rc->buf[rc->buf_len - 1] = '\0'; in eap_fast_read_line()
259 rc->buf_len = 2048; in eap_fast_init_pac_data()
260 rc->buf = os_malloc(rc->buf_len); in eap_fast_init_pac_data()
478 static void eap_fast_write(char **buf, char **pos, size_t *buf_len, in eap_fast_write() argument
494 if (*pos - *buf + need > *buf_len) { in eap_fast_write()
495 char *nbuf = os_realloc(*buf, *buf_len + need); in eap_fast_write()
[all …]
/external/boringssl/src/crypto/ec/
Dec_asn1.c394 size_t buf_len = 0, tmp_len; in i2d_ECPrivateKey() local
410 buf_len = BN_num_bytes(&key->group->order); in i2d_ECPrivateKey()
411 buffer = OPENSSL_malloc(buf_len); in i2d_ECPrivateKey()
417 if (!BN_bn2bin_padded(buffer, buf_len, key->priv_key)) { in i2d_ECPrivateKey()
422 if (!M_ASN1_OCTET_STRING_set(priv_key->privateKey, buffer, buf_len)) { in i2d_ECPrivateKey()
447 if (tmp_len > buf_len) { in i2d_ECPrivateKey()
454 buf_len = tmp_len; in i2d_ECPrivateKey()
458 buf_len, NULL)) { in i2d_ECPrivateKey()
465 if (!M_ASN1_BIT_STRING_set(priv_key->publicKey, buffer, buf_len)) { in i2d_ECPrivateKey()
548 size_t buf_len = 0; in i2o_ECPublicKey() local
[all …]
/external/libunwind/src/coredump/
D_UCD_get_proc_name.c34 char *buf, size_t buf_len, unw_word_t *offp) in elf_w()
52 ret = elf_w (get_proc_name_in_image) (as, &ui->edi.ei, segbase, mapoff, ip, buf, buf_len, offp); in elf_w()
59 char *buf, size_t buf_len, unw_word_t *offp, void *arg) in _UCD_get_proc_name() argument
64 return _Uelf64_CD_get_proc_name (ui, as, ip, buf, buf_len, offp); in _UCD_get_proc_name()
66 return _Uelf32_CD_get_proc_name (ui, as, ip, buf, buf_len, offp); in _UCD_get_proc_name()
/external/libmicrohttpd/src/examples/
Ddemo.c236 size_t buf_len; member
277 if (rdc->off + 1024 > rdc->buf_len) in list_directory()
281 if ( (2 * rdc->buf_len + 1024) < rdc->buf_len) in list_directory()
283 rdc->buf_len = 2 * rdc->buf_len + 1024; in list_directory()
284 if (NULL == (r = realloc (rdc->buf, rdc->buf_len))) in list_directory()
289 rdc->buf_len - rdc->off, in list_directory()
315 rdc.buf_len = initial_allocation; in update_directory()
316 if (NULL == (rdc.buf = malloc (rdc.buf_len))) in update_directory()
321 rdc.off = snprintf (rdc.buf, rdc.buf_len, in update_directory()
333 rdc.off += snprintf (&rdc.buf[rdc.off], rdc.buf_len - rdc.off, in update_directory()
[all …]
Ddemo_https.c237 size_t buf_len; member
278 if (rdc->off + 1024 > rdc->buf_len) in list_directory()
282 if ( (2 * rdc->buf_len + 1024) < rdc->buf_len) in list_directory()
284 rdc->buf_len = 2 * rdc->buf_len + 1024; in list_directory()
285 if (NULL == (r = realloc (rdc->buf, rdc->buf_len))) in list_directory()
290 rdc->buf_len - rdc->off, in list_directory()
316 rdc.buf_len = initial_allocation; in update_directory()
317 if (NULL == (rdc.buf = malloc (rdc.buf_len))) in update_directory()
322 rdc.off = snprintf (rdc.buf, rdc.buf_len, in update_directory()
334 rdc.off += snprintf (&rdc.buf[rdc.off], rdc.buf_len - rdc.off, in update_directory()
[all …]
/external/selinux/policycoreutils/sestatus/
Dsestatus.c93 int buf_len, section = -1; in load_checks() local
106 buf_len = strlen(buf); in load_checks()
107 if (buf[buf_len - 1] == '\n') in load_checks()
108 buf[buf_len - 1] = 0; in load_checks()
113 buf_len--; in load_checks()
134 (char *)malloc((buf_len) * in load_checks()
136 memcpy(pc[*npc], bufp, buf_len); in load_checks()
144 (char *)malloc((buf_len) * in load_checks()
146 memcpy(fc[*nfc], bufp, buf_len); in load_checks()
/external/wpa_supplicant_8/src/eap_common/
Deap_peap_common.c17 u8 *buf, size_t buf_len) in peap_prfplus() argument
60 extra[0] = buf_len & 0xff; in peap_prfplus()
69 while (pos < buf_len) { in peap_prfplus()
71 plen = buf_len - pos; in peap_prfplus()
/external/google-breakpad/src/third_party/libdisasm/swig/
Dlibdisasm.i92 (unsigned char *buf, size_t buf_len)
429 x86_insn_t * disasm( unsigned char *buf, size_t buf_len, in disasm() argument
432 x86_disasm( buf, buf_len, buf_rva, offset, insn ); in disasm()
436 int disasm_range( unsigned char *buf, size_t buf_len, in disasm_range() argument
442 if ( len > buf_len ) { in disasm_range()
443 len = buf_len; in disasm_range()
450 int disasm_forward( unsigned char *buf, size_t buf_len, in disasm_forward() argument
455 return x86_disasm_forward( buf, buf_len, buf_rva, offset, in disasm_forward()
460 size_t disasm_invariant( unsigned char *buf, size_t buf_len, in disasm_invariant() argument
462 return x86_invariant_disasm( buf, buf_len, inv ); in disasm_invariant()
[all …]
/external/libunwind/src/
Delfxx.c160 char* buf, size_t buf_len, unw_word_t* offp, Elf_W(Ehdr)* ehdr) { in elf_w()
221 (uint8_t*) buf, buf_len, true); in elf_w()
229 buf[buf_len] = '\0'; in elf_w()
313 char* buf, size_t buf_len, unw_word_t* offp) { in elf_w()
360 if (buf_len > max_size) { in elf_w()
361 buf_len = max_size; in elf_w()
364 strncpy (buf, str_name, buf_len); in elf_w()
367 buf[buf_len] = '\0'; in elf_w()
423 char *buf, size_t buf_len, unw_word_t* offp, Elf_W(Ehdr)* ehdr) { in elf_w()
427 if (buf_len <= 1) { in elf_w()
[all …]

1234567