Home
last modified time | relevance | path

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

12345678910>>...14

/openbsd/regress/lib/libssl/unit/
H A 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()
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()
140 buf[buflen - 1] = 0xab; in ssl_list_to_bytes_no_scsv()
[all …]
/openbsd/usr.sbin/dhcrelay/
H A Dpacket.c107 if (buflen < offset + ETHER_HDR_LEN) in assemble_hw_header()
133 if (buflen < offset + sizeof(ip) + sizeof(udp)) in assemble_udp_ip_header()
181 if (buflen < offset + ip_len) in decode_hw_header()
197 if (buflen < offset + ETHER_HDR_LEN) in decode_hw_header()
233 if (buflen < offset + sizeof(*ip)) in decode_udp_ip_header()
236 if (buflen < offset + ip_len) in decode_udp_ip_header()
265 if (buflen != offset + ntohs(ip->ip_len)) in decode_udp_ip_header()
267 ntohs(ip->ip_len), buflen - offset); in decode_udp_ip_header()
271 if (buflen < offset + ntohs(ip->ip_len)) in decode_udp_ip_header()
275 if (buflen < offset + ip_len + sizeof(*udp)) in decode_udp_ip_header()
[all …]
/openbsd/usr.sbin/vmd/
H A Dpacket.c105 if (buflen < offset + ETHER_HDR_LEN) in assemble_hw_header()
131 if (buflen < offset + sizeof(ip) + sizeof(udp)) in assemble_udp_ip_header()
181 if (buflen < offset + ip_len) in decode_hw_header()
197 if (buflen < offset + ETHER_HDR_LEN) in decode_hw_header()
232 if (buflen < offset + sizeof(*ip)) in decode_udp_ip_header()
239 buflen < offset + ip_len) in decode_udp_ip_header()
260 if (buflen != offset + ntohs(ip->ip_len)) in decode_udp_ip_header()
262 ntohs(ip->ip_len), buflen - offset); in decode_udp_ip_header()
266 if (buflen < offset + ntohs(ip->ip_len)) in decode_udp_ip_header()
270 if (buflen < offset + ip_len + sizeof(*udp)) in decode_udp_ip_header()
[all …]
/openbsd/sbin/dhclient/
H A Dpacket.c107 decode_udp_ip_header(unsigned char *buf, uint32_t buflen, in decode_udp_ip_header() argument
124 if (sizeof(*ip) > buflen) in decode_udp_ip_header()
127 if (ip_len > buflen) in decode_udp_ip_header()
147 if (ntohs(ip->ip_len) != buflen) in decode_udp_ip_header()
149 log_procname, ntohs(ip->ip_len), buflen); in decode_udp_ip_header()
152 if (ntohs(ip->ip_len) > buflen) in decode_udp_ip_header()
156 if (ip_len + sizeof(*udp) > buflen) in decode_udp_ip_header()
162 if (ip_len + ntohs(udp->uh_ulen) > buflen) in decode_udp_ip_header()
173 if ((len < 0) || (len + data > buf + buflen)) { in decode_udp_ip_header()
187 if (len + data != buf + buflen) in decode_udp_ip_header()
/openbsd/lib/libc/string/
H A 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/usr.sbin/dhcpd/
H A Dpacket.c157 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()
239 if ((len < 0) || (len + data > buf + buflen)) { in decode_udp_ip_header()
[all …]
/openbsd/lib/libskey/
H A 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()
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()
136 keycrunch_rmd160(char *result, char *buf, size_t buflen) in keycrunch_rmd160() argument
[all …]
/openbsd/lib/libc/gen/
H A Dgetpwent.c80 size_t buflen, struct passwd *pw, int *);
82 size_t buflen, struct passwd *pw, int *);
312 size_t buflen; in getpwent() local
357 __ypcurrentlen > buflen) { in getpwent()
379 __ypcurrentlen > buflen) { in getpwent()
398 __ypcurrentlen > buflen) { in getpwent()
558 char *buf, size_t buflen, int *flagsp) in __yppwlookup() argument
602 if (r != 0 || ypcurrentlen > buflen) { in __yppwlookup()
764 buf, buflen, flagsp); in getpwnam_internal()
847 buf, buflen, flagsp); in getpwuid_internal()
[all …]
/openbsd/sys/arch/macppc/macppc/
H A 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/lib/libc/asr/
H A 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/usr.sbin/smtpd/
H A 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/lib/libutil/
H A 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/lib/libc/stdio/
H A 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/lib/libevent/
H A 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/games/hangman/
H A 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/gnu/usr.bin/binutils/opcodes/
H A Dopenrisc-dis.c280 int buflen, in read_insn() argument
292 ex_info->valid = (1 << buflen) - 1; in read_insn()
310 unsigned int buflen) in print_insn() argument
318 basesize = 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
422 buflen = cd->base_insn_bitsize / 8; in default_print_insn()
423 status = (*info->read_memory_func) (pc, buf, buflen, info); in default_print_insn()
428 buflen = cd->min_insn_bitsize / 8; in default_print_insn()
[all …]
H A Dm32r-dis.c102 int buflen = (pc & 3) == 0 ? 4 : 2; local
119 return print_insn (cd, pc, info, buf, buflen);
405 int buflen, in read_insn() argument
417 ex_info->valid = (1 << buflen) - 1; in read_insn()
435 unsigned int buflen) in print_insn() argument
443 basesize = cd->base_insn_bitsize < buflen * 8 ? in print_insn()
451 ex_info.valid = (1 << buflen) - 1; in print_insn()
543 int buflen; in default_print_insn() local
547 buflen = cd->base_insn_bitsize / 8; in default_print_insn()
553 buflen = cd->min_insn_bitsize / 8; in default_print_insn()
[all …]
H A Dxstormy16-dis.c313 int buflen, in read_insn() argument
325 ex_info->valid = (1 << buflen) - 1; in read_insn()
343 unsigned int buflen) in print_insn() argument
351 basesize = 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
455 buflen = cd->base_insn_bitsize / 8; in default_print_insn()
456 status = (*info->read_memory_func) (pc, buf, buflen, info); in default_print_insn()
461 buflen = cd->min_insn_bitsize / 8; in default_print_insn()
[all …]
/openbsd/gnu/usr.bin/binutils-2.17/opcodes/
H A Dopenrisc-dis.c277 int buflen, in read_insn() argument
290 ex_info->valid = (1 << buflen) - 1; in read_insn()
308 unsigned int buflen) in print_insn() argument
316 basesize = 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
420 buflen = cd->base_insn_bitsize / 8; in default_print_insn()
421 status = (*info->read_memory_func) (pc, buf, buflen, info); in default_print_insn()
426 buflen = cd->min_insn_bitsize / 8; in default_print_insn()
[all …]
H A Dm32r-dis.c98 int buflen = (pc & 3) == 0 ? 4 : 2; in my_print_insn() local
115 return print_insn (cd, pc, info, buf, buflen); in my_print_insn()
398 int buflen, in read_insn() argument
411 ex_info->valid = (1 << buflen) - 1; in read_insn()
429 unsigned int buflen) in print_insn() argument
437 basesize = cd->base_insn_bitsize < buflen * 8 ? in print_insn()
445 ex_info.valid = (1 << buflen) - 1; in print_insn()
537 int buflen; in default_print_insn() local
541 buflen = cd->base_insn_bitsize / 8; in default_print_insn()
547 buflen = cd->min_insn_bitsize / 8; in default_print_insn()
[all …]
H A Dxstormy16-dis.c310 int buflen, in read_insn() argument
323 ex_info->valid = (1 << buflen) - 1; in read_insn()
341 unsigned int buflen) in print_insn() argument
349 basesize = 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
453 buflen = cd->base_insn_bitsize / 8; in default_print_insn()
454 status = (*info->read_memory_func) (pc, buf, buflen, info); in default_print_insn()
459 buflen = cd->min_insn_bitsize / 8; in default_print_insn()
[all …]
/openbsd/sbin/isakmpd/
H A 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()
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()
279 buflen, 1); in nat_t_add_nat_d()
[all …]
/openbsd/sys/arch/arm64/stand/efiboot/
H A 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/sys/arch/amd64/stand/efiboot/
H A 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/sys/arch/riscv64/stand/efiboot/
H A 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>>...14