Home
last modified time | relevance | path

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

123456789

/external/boringssl/src/decrepit/bio/
Dbase64_bio.c79 int buf_len; member
138 ctx->buf_len = 0; in b64_read()
145 if (ctx->buf_len > 0) { in b64_read()
146 assert(ctx->buf_len >= ctx->buf_off); in b64_read()
147 i = ctx->buf_len - ctx->buf_off; in b64_read()
157 if (ctx->buf_len == ctx->buf_off) { in b64_read()
158 ctx->buf_len = 0; in b64_read()
282 ctx->buf_len = 0; in b64_read()
284 ctx->buf_len = z; in b64_read()
289 &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_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 …]
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 …]
/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/ltp/testcases/kernel/sched/nptl/
Dnptl01.c72 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() argument
119 strerror_r(ret, buf, buf_len)); in call_cond_wait()
[all …]
/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()
Dsha512-prf.c31 const u8 *data, size_t data_len, u8 *buf, size_t buf_len) in sha512_prf() argument
34 buf_len * 8); in sha512_prf()
64 size_t buf_len = (buf_len_bits + 7) / 8; in sha512_prf_bits() local
77 while (pos < buf_len) { in sha512_prf_bits()
78 plen = buf_len - pos; in sha512_prf_bits()
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.c31 const u8 *data, size_t data_len, u8 *buf, size_t buf_len) in sha384_prf() argument
34 buf_len * 8); in sha384_prf()
64 size_t buf_len = (buf_len_bits + 7) / 8; in sha384_prf_bits() local
77 while (pos < buf_len) { in sha384_prf_bits()
78 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/boringssl/src/crypto/evp/
Dprint.c141 size_t buf_len = 0; in do_rsa_print() local
143 update_buflen(rsa->n, &buf_len); in do_rsa_print()
144 update_buflen(rsa->e, &buf_len); in do_rsa_print()
147 update_buflen(rsa->d, &buf_len); in do_rsa_print()
148 update_buflen(rsa->p, &buf_len); in do_rsa_print()
149 update_buflen(rsa->q, &buf_len); in do_rsa_print()
150 update_buflen(rsa->dmp1, &buf_len); in do_rsa_print()
151 update_buflen(rsa->dmq1, &buf_len); in do_rsa_print()
152 update_buflen(rsa->iqmp, &buf_len); in do_rsa_print()
155 m = (uint8_t *)OPENSSL_malloc(buf_len + 10); in do_rsa_print()
[all …]
/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/wpa_supplicant_8/src/eap_peer/
Deap_fast_pac.c185 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 + need); in eap_fast_write()
[all …]
/external/ltp/lib/
Dget_path.c53 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()
/external/selinux/libselinux/src/
Dlabel_support.c145 char *from_addr, size_t buf_len, in digest_add_specfile() argument
154 if (digest->hashbuf_size + buf_len < digest->hashbuf_size) { in digest_add_specfile()
158 digest->hashbuf_size += buf_len; in digest_add_specfile()
168 if (fread(digest->hashbuf + (digest->hashbuf_size - buf_len), in digest_add_specfile()
169 1, buf_len, fp) != buf_len) in digest_add_specfile()
175 (digest->hashbuf_size - buf_len), in digest_add_specfile()
176 from_addr, buf_len); in digest_add_specfile()
/external/strace/
Dmsghdr.c298 unsigned int buf_len = control_len; in decode_msg_control() local
299 char *buf = buf_len < cmsg_size ? NULL : malloc(buf_len); in decode_msg_control()
300 if (!buf || umoven(tcp, addr, buf_len, buf) < 0) { in decode_msg_control()
309 while (buf_len >= cmsg_size) { in decode_msg_control()
332 kernel_ulong_t len = cmsg_len > buf_len ? buf_len : cmsg_len; in decode_msg_control()
340 buf_len -= cmsg_size; in decode_msg_control()
345 if (len >= buf_len) { in decode_msg_control()
346 buf_len = 0; in decode_msg_control()
350 buf_len -= len; in decode_msg_control()
352 if (buf_len) { in decode_msg_control()
[all …]
/external/syslinux/core/fs/pxe/
Dtftp.c87 uint16_t buf_len; in tftp_get_packet() local
105 buf_len = socket->tftp_blksize + 4; in tftp_get_packet()
106 err = core_udp_recv(socket, socket->tftp_pktbuf, &buf_len, in tftp_get_packet()
121 if (buf_len < 4) /* Bad size for a DATA packet */ in tftp_get_packet()
154 buffersize = buf_len - 4; /* Skip TFTP header */ in tftp_get_packet()
190 uint16_t buf_len; in tftp_open() local
251 buf_len = sizeof(reply_packet_buf); in tftp_open()
253 err = core_udp_recv(socket, reply_packet_buf, &buf_len, in tftp_open()
262 dprintf("tftp_open: got packet buflen=%d\n", buf_len); in tftp_open()
263 if ((src_ip == url->ip) && (buf_len >= 2)) in tftp_open()
[all …]
/external/libmicrohttpd/src/examples/
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 …]
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 …]
/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/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/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 …]

123456789