Home
last modified time | relevance | path

Searched refs:buflen (Results 1 – 25 of 323) sorted by relevance

12345678910>>...13

/openbsd/src/regress/lib/libssl/unit/
Dcipher_list.c99 size_t buflen, outlen; in ssl_list_to_bytes_scsv() local
104 buflen = cb_len + 2 + 2; in ssl_list_to_bytes_scsv()
105 CHECK((buf = calloc(1, buflen)) != NULL); in ssl_list_to_bytes_scsv()
110 CHECK_GOTO(CBB_init_fixed(&cbb, buf, buflen)); in ssl_list_to_bytes_scsv()
116 CHECK_GOTO(buf[buflen - 4] == 0x00 && buf[buflen - 3] == 0xff); in ssl_list_to_bytes_scsv()
117 CHECK_GOTO(buf[buflen - 2] == 0x00 && buf[buflen - 1] == 0x00); in ssl_list_to_bytes_scsv()
132 size_t buflen, outlen; in ssl_list_to_bytes_no_scsv() local
137 buflen = cb_len + 2; in ssl_list_to_bytes_no_scsv()
138 CHECK((buf = calloc(1, buflen)) != NULL); in ssl_list_to_bytes_no_scsv()
139 buf[buflen - 2] = 0xfe; in ssl_list_to_bytes_no_scsv()
[all …]
/openbsd/src/usr.sbin/dhcrelay/
Dpacket.c100 assemble_hw_header(unsigned char *buf, size_t buflen, in assemble_hw_header() argument
107 if (buflen < offset + ETHER_HDR_LEN) in assemble_hw_header()
127 assemble_udp_ip_header(unsigned char *buf, size_t buflen, size_t offset, in assemble_udp_ip_header() argument
133 if (buflen < offset + sizeof(ip) + sizeof(udp)) in assemble_udp_ip_header()
169 decode_hw_header(unsigned char *buf, size_t buflen, in decode_hw_header() argument
177 if (buflen < offset + ENC_HDRLEN + sizeof(*ip)) in decode_hw_header()
181 if (buflen < offset + ip_len) in decode_hw_header()
197 if (buflen < offset + ETHER_HDR_LEN) in decode_hw_header()
216 decode_udp_ip_header(unsigned char *buf, size_t buflen, in decode_udp_ip_header() argument
233 if (buflen < offset + sizeof(*ip)) in decode_udp_ip_header()
[all …]
/openbsd/src/usr.sbin/vmd/
Dpacket.c98 assemble_hw_header(unsigned char *buf, size_t buflen, in assemble_hw_header() argument
105 if (buflen < offset + ETHER_HDR_LEN) in assemble_hw_header()
125 assemble_udp_ip_header(unsigned char *buf, size_t buflen, size_t offset, in assemble_udp_ip_header() argument
131 if (buflen < offset + sizeof(ip) + sizeof(udp)) in assemble_udp_ip_header()
167 decode_hw_header(unsigned char *buf, size_t buflen, in decode_hw_header() argument
177 if (buflen < offset + ENC_HDRLEN + sizeof(*ip)) in decode_hw_header()
181 if (buflen < offset + ip_len) in decode_hw_header()
197 if (buflen < offset + ETHER_HDR_LEN) in decode_hw_header()
221 decode_udp_ip_header(unsigned char *buf, size_t buflen, in decode_udp_ip_header() argument
232 if (buflen < offset + sizeof(*ip)) in decode_udp_ip_header()
[all …]
/openbsd/src/lib/libc/string/
Dstrerror_r.c59 __num2string(int num, int sign, int setid, char *buf, size_t buflen, in __num2string() argument
66 len = strlcpy(buf, list[num], buflen); in __num2string()
67 if (len >= buflen) in __num2string()
70 len = strlcpy(buf, def, buflen); in __num2string()
71 if (len >= buflen) in __num2string()
74 ret = __itoa(num, sign, buf, len, buflen); in __num2string()
86 strerror_r(int errnum, char *strerrbuf, size_t buflen) in strerror_r() argument
90 ret_errno = __num2string(errnum, 1, 1, strerrbuf, buflen, in strerror_r()
/openbsd/src/usr.sbin/dhcpd/
Dpacket.c153 decode_hw_header(unsigned char *buf, u_int32_t buflen, struct hardware *from) in decode_hw_header() argument
157 if (buflen < sizeof(eh)) in decode_hw_header()
170 decode_udp_ip_header(unsigned char *buf, u_int32_t buflen, in decode_udp_ip_header() argument
187 if (sizeof(*ip) > buflen) in decode_udp_ip_header()
190 if (ip_len > buflen) in decode_udp_ip_header()
211 if (ntohs(ip->ip_len) != buflen) in decode_udp_ip_header()
213 ntohs(ip->ip_len), buflen); in decode_udp_ip_header()
218 if (ntohs(ip->ip_len) > buflen) in decode_udp_ip_header()
222 if (ip_len + sizeof(*udp) > buflen) in decode_udp_ip_header()
228 if (ip_len + ntohs(udp->uh_ulen) > buflen) in decode_udp_ip_header()
[all …]
/openbsd/src/lib/libskey/
Dskeysubr.c69 size_t buflen; in keycrunch() local
71 buflen = strlen(seed) + strlen(passwd); in keycrunch()
72 if ((buf = malloc(buflen + 1)) == NULL) in keycrunch()
75 (void)strlcpy(buf, seed, buflen + 1); in keycrunch()
79 (void)strlcat(buf, passwd, buflen + 1); in keycrunch()
82 skey_algorithm_table[skey_hash_type].keycrunch(result, buf, buflen); in keycrunch()
89 keycrunch_md5(char *result, char *buf, size_t buflen) in keycrunch_md5() argument
96 MD5Update(&md, (unsigned char *)buf, buflen); in keycrunch_md5()
107 keycrunch_sha1(char *result, char *buf, size_t buflen) in keycrunch_sha1() argument
114 SHA1Update(&sha, (unsigned char *)buf, buflen); in keycrunch_sha1()
[all …]
/openbsd/src/lib/libc/gen/
Dgetpwent.c77 static int __hashpw(DBT *, char *buf, size_t buflen, struct passwd *, int *);
80 size_t buflen, struct passwd *pw, int *);
82 size_t buflen, struct passwd *pw, int *);
312 size_t buflen; in getpwent() local
320 if ((pw = __get_pw_buf(&pwbuf, &buflen, -1, NULL)) == NULL) in getpwent()
357 __ypcurrentlen > buflen) { in getpwent()
379 __ypcurrentlen > buflen) { in getpwent()
398 __ypcurrentlen > buflen) { in getpwent()
427 if (__hashpw(&key, pwbuf, buflen, pw, &_pw_flags)) { in getpwent()
558 char *buf, size_t buflen, int *flagsp) in __yppwlookup() argument
[all …]
Delf_aux_info.c29 elf_aux_info(int request, void *buf, int buflen) in elf_aux_info() argument
33 if (buflen < 0) in elf_aux_info()
38 if (buflen != sizeof(unsigned long)) in elf_aux_info()
46 if (buflen != sizeof(unsigned long)) in elf_aux_info()
54 if (buflen != sizeof(int)) in elf_aux_info()
/openbsd/src/sys/arch/macppc/macppc/
Dopenfirm.c156 OF_getprop(int handle, char *prop, void *buf, int buflen) in OF_getprop() argument
165 int buflen; in OF_getprop() member
175 if (buflen > NBPG) in OF_getprop()
181 args.buflen = buflen; in OF_getprop()
194 OF_setprop(int handle, char *prop, const void *buf, int buflen) in OF_setprop() argument
203 int buflen; in OF_setprop() member
213 if (buflen > NBPG) in OF_setprop()
218 ofbcopy(buf, OF_buf, buflen); in OF_setprop()
220 args.buflen = buflen; in OF_setprop()
/openbsd/src/lib/libc/asr/
Dgetnameinfo.c47 asr_print_addr(const struct sockaddr *sa, char *buf, size_t buflen) in asr_print_addr() argument
70 s = strlcpy(buf, tmp, buflen); in asr_print_addr()
88 if (s < buflen) in asr_print_addr()
89 (void)strlcat(buf, scope, buflen); in asr_print_addr()
110 asr_print_port(const struct sockaddr *sa, const char *proto, char *buf, size_t buflen) in asr_print_port() argument
134 n = strlcpy(buf, s.s_name, buflen); in asr_print_port()
141 r = snprintf(buf, buflen, "%u", ntohs(port)); in asr_print_port()
142 if (r < 0 || r >= buflen) /* Actually, this can not happen */ in asr_print_port()
/openbsd/src/usr.sbin/smtpd/
Drfc5322.c29 size_t buflen; member
77 parser->hdr.buflen = 0; in rfc5322_clear()
78 parser->val.buflen = 0; in rfc5322_clear()
144 parser->val.buflen = 0; in _rfc5322_next()
159 parser->hdr.buflen = len + 1; in _rfc5322_next()
245 if (SIZE_T_MAX - b->buflen <= sz) { in buf_grow()
250 return buf_alloc(b, b->buflen + sz); in buf_grow()
261 (void)memmove(b->buf + b->buflen, s, len + 1); in buf_cat()
262 b->buflen += len; in buf_cat()
/openbsd/src/lib/libutil/
Dopendisk.c44 opendisk(const char *path, int flags, char *buf, size_t buflen, int iscooked) in opendisk() argument
48 snprintf(buf, buflen, "%s", path); in opendisk()
63 snprintf(buf, buflen, "%s%c", path, 'a' + rawpart); in opendisk()
71 snprintf(buf, buflen, "%s%s%s", _PATH_DEV, iscooked ? "" : "r", path); in opendisk()
76 snprintf(buf, buflen, "%s%s%s%c", _PATH_DEV, iscooked ? "" : "r", path, in opendisk()
/openbsd/src/lib/libc/stdio/
Dgetdelim.c46 getdelim(char **__restrict buf, size_t *__restrict buflen, in getdelim() argument
55 if (buf == NULL || buflen == NULL) { in getdelim()
62 *buflen = 0; in getdelim()
88 if (newlen > *buflen) { in getdelim()
106 newb = recallocarray(*buf, *buflen, newlen, 1); in getdelim()
110 *buflen = newlen; in getdelim()
/openbsd/src/gnu/usr.bin/binutils-2.17/opcodes/
Dopenrisc-dis.c277 int buflen, in read_insn() argument
281 int status = (*info->read_memory_func) (pc, buf, buflen, info); in read_insn()
290 ex_info->valid = (1 << buflen) - 1; in read_insn()
293 *insn_value = bfd_get_bits (buf, buflen * 8, info->endian == BFD_ENDIAN_BIG); in read_insn()
308 unsigned int buflen) in print_insn() argument
316 basesize = cd->base_insn_bitsize < buflen * 8 ? in print_insn()
317 cd->base_insn_bitsize : buflen * 8; in print_insn()
324 ex_info.valid = (1 << buflen) - 1; in print_insn()
355 if ((unsigned) (CGEN_INSN_BITSIZE (insn) / 8) < buflen && in print_insn()
416 int buflen; in default_print_insn() local
[all …]
Dm32r-dis.c98 int buflen = (pc & 3) == 0 ? 4 : 2; in my_print_insn() local
105 buf, buflen, info); in my_print_insn()
115 return print_insn (cd, pc, info, buf, buflen); in my_print_insn()
398 int buflen, in read_insn() argument
402 int status = (*info->read_memory_func) (pc, buf, buflen, info); in read_insn()
411 ex_info->valid = (1 << buflen) - 1; in read_insn()
414 *insn_value = bfd_get_bits (buf, buflen * 8, info->endian == BFD_ENDIAN_BIG); in read_insn()
429 unsigned int buflen) in print_insn() argument
437 basesize = cd->base_insn_bitsize < buflen * 8 ? in print_insn()
438 cd->base_insn_bitsize : buflen * 8; in print_insn()
[all …]
Dxstormy16-dis.c310 int buflen, in read_insn() argument
314 int status = (*info->read_memory_func) (pc, buf, buflen, info); in read_insn()
323 ex_info->valid = (1 << buflen) - 1; in read_insn()
326 *insn_value = bfd_get_bits (buf, buflen * 8, info->endian == BFD_ENDIAN_BIG); in read_insn()
341 unsigned int buflen) in print_insn() argument
349 basesize = cd->base_insn_bitsize < buflen * 8 ? in print_insn()
350 cd->base_insn_bitsize : buflen * 8; in print_insn()
357 ex_info.valid = (1 << buflen) - 1; in print_insn()
388 if ((unsigned) (CGEN_INSN_BITSIZE (insn) / 8) < buflen && in print_insn()
449 int buflen; in default_print_insn() local
[all …]
/openbsd/src/gnu/usr.bin/binutils/opcodes/
Dopenrisc-dis.c280 int buflen, in read_insn() argument
284 int status = (*info->read_memory_func) (pc, buf, buflen, info); in read_insn()
292 ex_info->valid = (1 << buflen) - 1; in read_insn()
295 *insn_value = bfd_get_bits (buf, buflen * 8, info->endian == BFD_ENDIAN_BIG); in read_insn()
310 unsigned int buflen) in print_insn() argument
318 basesize = cd->base_insn_bitsize < buflen * 8 ? in print_insn()
319 cd->base_insn_bitsize : buflen * 8; in print_insn()
326 ex_info.valid = (1 << buflen) - 1; in print_insn()
357 if ((unsigned) (CGEN_INSN_BITSIZE (insn) / 8) < buflen && in print_insn()
418 int buflen; in default_print_insn() local
[all …]
Dm32r-dis.c102 int buflen = (pc & 3) == 0 ? 4 : 2; local
109 buf, buflen, info);
119 return print_insn (cd, pc, info, buf, buflen);
405 int buflen, in read_insn() argument
409 int status = (*info->read_memory_func) (pc, buf, buflen, info); in read_insn()
417 ex_info->valid = (1 << buflen) - 1; in read_insn()
420 *insn_value = bfd_get_bits (buf, buflen * 8, info->endian == BFD_ENDIAN_BIG); in read_insn()
435 unsigned int buflen) in print_insn() argument
443 basesize = cd->base_insn_bitsize < buflen * 8 ? in print_insn()
444 cd->base_insn_bitsize : buflen * 8; in print_insn()
[all …]
Dxstormy16-dis.c313 int buflen, in read_insn() argument
317 int status = (*info->read_memory_func) (pc, buf, buflen, info); in read_insn()
325 ex_info->valid = (1 << buflen) - 1; in read_insn()
328 *insn_value = bfd_get_bits (buf, buflen * 8, info->endian == BFD_ENDIAN_BIG); in read_insn()
343 unsigned int buflen) in print_insn() argument
351 basesize = cd->base_insn_bitsize < buflen * 8 ? in print_insn()
352 cd->base_insn_bitsize : buflen * 8; in print_insn()
359 ex_info.valid = (1 << buflen) - 1; in print_insn()
390 if ((unsigned) (CGEN_INSN_BITSIZE (insn) / 8) < buflen && in print_insn()
451 int buflen; in default_print_insn() local
[all …]
/openbsd/src/games/hangman/
Dksyms.c38 int buflen; in sym_getword() local
46 buflen = read(symfd, symbuf, BUFSIZ); in sym_getword()
47 if (buflen == -1) in sym_getword()
57 if (buflen + pos >= symsize) in sym_getword()
58 buflen = symsize - pos; in sym_getword()
59 *(end = symbuf + buflen) = '\0'; in sym_getword()
/openbsd/src/sbin/isakmpd/
Dnat_traversal.c141 size_t buflen = cap->hashsize + ISAKMP_GEN_SZ; in nat_t_add_vendor_payload() local
147 buf = malloc(buflen); in nat_t_add_vendor_payload()
150 (unsigned long)buflen); in nat_t_add_vendor_payload()
154 SET_ISAKMP_GEN_LENGTH(buf, buflen); in nat_t_add_vendor_payload()
156 if (message_add_payload(msg, ISAKMP_PAYLOAD_VENDOR, buf, buflen, 1)) { in nat_t_add_vendor_payload()
256 size_t hbuflen, buflen; in nat_t_add_nat_d() local
264 buflen = ISAKMP_NAT_D_DATA_OFF + hbuflen; in nat_t_add_nat_d()
265 buf = malloc(buflen); in nat_t_add_nat_d()
268 (unsigned long)buflen); in nat_t_add_nat_d()
273 SET_ISAKMP_GEN_LENGTH(buf, buflen); in nat_t_add_nat_d()
[all …]
/openbsd/src/lib/libevent/
Devutil.c75 evutil_snprintf(char *buf, size_t buflen, const char *format, ...) in evutil_snprintf() argument
80 r = evutil_vsnprintf(buf, buflen, format, ap); in evutil_snprintf()
86 evutil_vsnprintf(char *buf, size_t buflen, const char *format, va_list ap) in evutil_vsnprintf() argument
88 int r = vsnprintf(buf, buflen, format, ap); in evutil_vsnprintf()
89 buf[buflen-1] = '\0'; in evutil_vsnprintf()
/openbsd/src/sys/arch/arm64/stand/efiboot/
Defirng.c62 fwrandom(char *buf, size_t buflen) in fwrandom() argument
74 random = alloc(buflen); in fwrandom()
76 status = rng->GetRNG(rng, NULL, buflen, random); in fwrandom()
83 for (i = 0; i < buflen; i++) in fwrandom()
87 free(random, buflen); in fwrandom()
/openbsd/src/sys/arch/amd64/stand/efiboot/
Defirng.c62 fwrandom(char *buf, size_t buflen) in fwrandom() argument
74 random = alloc(buflen); in fwrandom()
76 status = rng->GetRNG(rng, NULL, buflen, random); in fwrandom()
83 for (i = 0; i < buflen; i++) in fwrandom()
87 free(random, buflen); in fwrandom()
/openbsd/src/sys/arch/riscv64/stand/efiboot/
Defirng.c62 fwrandom(char *buf, size_t buflen) in fwrandom() argument
74 random = alloc(buflen); in fwrandom()
76 status = rng->GetRNG(rng, NULL, buflen, random); in fwrandom()
83 for (i = 0; i < buflen; i++) in fwrandom()
87 free(random, buflen); in fwrandom()

12345678910>>...13