/freebsd/lib/libc/nameser/ |
H A D | ns_print.c | 439 &buf, &buflen)); in ns_sprintrrf() 492 &buf, &buflen)); in ns_sprintrrf() 556 &buf, &buflen)); in ns_sprintrrf() 612 &buf, &buflen)); in ns_sprintrrf() 614 &buf, &buflen)); in ns_sprintrrf() 903 &buf, &buflen)); in ns_sprintrrf() 905 &buf, &buflen)); in ns_sprintrrf() 995 &buf, &buflen)); in ns_sprintrrf() 997 &buf, &buflen)); in ns_sprintrrf() 1214 *buflen -= len; in addlen() [all …]
|
/freebsd/contrib/wpa/src/ap/ |
H A D | ctrl_iface_ap.c | 55 char *buf, size_t buflen) in hostapd_get_sta_conn_time() argument 73 if (os_snprintf_error(buflen, ret)) in hostapd_get_sta_conn_time() 81 char *buf, size_t buflen) in hostapd_get_sta_info() argument 96 if (os_snprintf_error(buflen, ret)) in hostapd_get_sta_info() 268 buflen - len); in hostapd_ctrl_iface_sta_mib() 393 char *buf, size_t buflen) in hostapd_ctrl_iface_sta_first() argument 400 char *buf, size_t buflen) in hostapd_ctrl_iface_sta() argument 427 buflen); in hostapd_ctrl_iface_sta() 442 char *buf, size_t buflen) in hostapd_ctrl_iface_sta_next() argument 640 char *buf, size_t buflen) in hostapd_ctrl_iface_signature() argument [all …]
|
/freebsd/crypto/openssl/providers/implementations/ciphers/ |
H A D | ciphercommon_block.c | 63 assert(*buflen <= blocksize); in ossl_cipher_fillblock() 71 *buflen += bufremain; in ossl_cipher_fillblock() 86 if (*buflen + *inlen > blocksize) { in ossl_cipher_trailingdata() 91 memcpy(buf + *buflen, *in, *inlen); in ossl_cipher_trailingdata() 92 *buflen += *inlen; in ossl_cipher_trailingdata() 104 for (i = *buflen; i < blocksize; i++) in ossl_cipher_padblock() 111 size_t len = *buflen; in ossl_cipher_unpadblock() 133 *buflen = len; in ossl_cipher_unpadblock() 168 return ssl3_cbc_remove_padding_and_mac(buflen, *buflen, buf, mac, in ossl_cipher_tlsunpadblock() 179 *buflen -= blocksize; in ossl_cipher_tlsunpadblock() [all …]
|
/freebsd/crypto/openssl/crypto/ |
H A D | o_str.c | 173 if (buflen != NULL) in hexstr2buf_sep() 174 *buflen = cnt; in hexstr2buf_sep() 204 if (buflen != NULL) in ossl_hexstr2buf_sep() 205 *buflen = 0; in ossl_hexstr2buf_sep() 208 if (buflen != NULL) in ossl_hexstr2buf_sep() 209 *buflen = (long)tmp_buflen; in ossl_hexstr2buf_sep() 230 size_t len = has_sep ? buflen * 3 : 1 + buflen * 2; in buf2hexstr_sep() 271 if (buflen == 0) in ossl_buf2hexstr_sep() 274 tmp_n = (sep != CH_ZERO) ? buflen * 3 : 1 + buflen * 2; in ossl_buf2hexstr_sep() 310 if (err == NULL || buflen == 0) in openssl_strerror_r() [all …]
|
/freebsd/contrib/wpa/src/fst/ |
H A D | fst_ctrl_iface.c | 191 return os_snprintf(buf, buflen, in session_get() 292 return os_snprintf(buf, buflen, "OK\n"); in session_remove() 315 return os_snprintf(buf, buflen, "OK\n"); in session_initiate() 358 return os_snprintf(buf, buflen, "OK\n"); in session_respond() 464 size_t buflen; member 478 c->buflen -= ret; in list_session_enum_cb() 496 ctx.buflen = buflen; in list_sessions() 661 char *buf, size_t buflen) in print_band() argument 754 buf + ret, buflen - ret); in fst_ctrl_iface_mb_info() 848 if (!**endp || buflen <= 1) in fst_read_next_text_param() [all …]
|
/freebsd/sys/contrib/openzfs/lib/libzutil/ |
H A D | zutil_nicenum.c | 84 snprintf(buf, buflen, "%llu", (u_longlong_t)num); in zfs_nicenum_format() 87 snprintf(buf, buflen, "%llu", (u_longlong_t)num); in zfs_nicenum_format() 90 snprintf(buf, buflen, "%s", "-"); in zfs_nicenum_format() 103 (void) snprintf(buf, buflen, "-"); in zfs_nicenum_format() 136 if (snprintf(buf, buflen, "%d%s", in zfs_nicenum_format() 141 if (snprintf(buf, buflen, "%.*f%s", i, in zfs_nicenum_format() 153 zfs_nicenum(uint64_t num, char *buf, size_t buflen) in zfs_nicenum() argument 163 zfs_nicetime(uint64_t num, char *buf, size_t buflen) in zfs_nicetime() argument 172 zfs_niceraw(uint64_t num, char *buf, size_t buflen) in zfs_niceraw() argument 174 zfs_nicenum_format(num, buf, buflen, ZFS_NICENUM_RAW); in zfs_niceraw() [all …]
|
/freebsd/lib/libugidfw/ |
H A D | ugidfw.c | 72 left = buflen; in bsde_rule_to_string() 511 size_t buflen, char *errstr){ in bsde_parse_uidrange() argument 557 size_t buflen, char *errstr){ in bsde_parse_gidrange() argument 617 if (errstr && buflen) { in bsde_get_jailid() 621 jiov[3].iov_len = buflen; in bsde_get_jailid() 870 buflen, errstr) < 0) in bsde_parse_object() 916 buflen, errstr) < 0) in bsde_parse_object() 926 snprintf(errstr, buflen, in bsde_parse_object() 1009 size_t buflen, char *errstr) in bsde_parse_rule() argument 1070 &rule->mbr_mode, buflen, errstr); in bsde_parse_rule() [all …]
|
H A D | ugidfw.h | 39 size_t buflen); 40 int bsde_parse_mode(int argc, char *argv[], mode_t *mode, size_t buflen, 43 struct mac_bsdextended_rule *rule, size_t buflen, char *errstr); 45 struct mac_bsdextended_rule *rule, size_t buflen, char *errstr); 47 int bsde_get_rule_count(size_t buflen, char *errstr); 48 int bsde_get_rule_slots(size_t buflen, char *errstr); 51 int bsde_delete_rule(int rulenum, size_t buflen, char *errstr); 53 size_t buflen, char *errstr); 55 size_t buflen, char *errstr);
|
/freebsd/sbin/dmesg/ |
H A D | dmesg.c | 69 size_t buflen, bufpos; in main() local 110 buflen += buflen/8; in main() 112 if ((bp = malloc(buflen + 2)) == NULL) in main() 116 if (buflen > 0 && bp[buflen - 1] == '\0') in main() 117 buflen--; in main() 148 buflen = cur.msg_size; in main() 155 if (buflen == 0 || bp[buflen - 1] != '\n') in main() 156 bp[buflen++] = '\n'; in main() 157 bp[buflen] = '\0'; in main() 159 if ((visbp = malloc(4 * buflen + 1)) == NULL) in main() [all …]
|
/freebsd/contrib/wpa/wpa_supplicant/ |
H A D | main_winsvc.c | 67 DWORD buflen, val; in read_interface() local 81 buflen = sizeof(ctrl_interface); in read_interface() 92 buflen = sizeof(adapter); in read_interface() 103 buflen = sizeof(config); in read_interface() 114 buflen = sizeof(val); in read_interface() 116 (LPBYTE) &val, &buflen); in read_interface() 140 DWORD val, buflen, i; in wpa_supplicant_thread() local 156 buflen = sizeof(val); in wpa_supplicant_thread() 163 buflen = sizeof(val); in wpa_supplicant_thread() 170 buflen = sizeof(val); in wpa_supplicant_thread() [all …]
|
/freebsd/lib/libsys/ |
H A D | auxv.c | 281 if (buflen < 0) in _elf_aux_info() 287 memcpy(buf, canary, buflen); in _elf_aux_info() 301 (unsigned int)buflen) in _elf_aux_info() 329 if (buflen == sizeof(int)) { in _elf_aux_info() 339 if (buflen == sizeof(int)) { in _elf_aux_info() 349 if (buflen == sizeof(int)) { in _elf_aux_info() 359 if (buflen == sizeof(void *)) { in _elf_aux_info() 369 if (buflen == sizeof(int)) { in _elf_aux_info() 376 if (buflen == sizeof(void *)) { in _elf_aux_info() 386 if (buflen == sizeof(void *)) { in _elf_aux_info() [all …]
|
/freebsd/lib/libc/tests/string/ |
H A D | strcspn_test.c | 57 for (i = 0; i < buflen; i++) in testcase() 75 buf[buflen - 1] = 1; in testcase() 76 expected = buflen - 1; in testcase() 78 expected = buflen; in testcase() 81 buf[buflen - 1] = UCHAR_MAX; in testcase() 82 expected = buflen - 1; in testcase() 84 expected = buflen; in testcase() 157 memset(buf, '-', buflen); in test_match_positions() 162 buf[buflen] = '\0'; in test_match_positions() 216 memset(buf, '-', buflen); in test_match_order() [all …]
|
/freebsd/sys/contrib/openzfs/cmd/zed/ |
H A D | zed_event.c | 278 int buflen; in _zed_event_add_var() local 328 buflen -= n; in _zed_event_add_var() 331 buflen--; in _zed_event_add_var() 389 buflen -= n; in _zed_event_add_int8_array() 419 buflen -= n; in _zed_event_add_uint8_array() 449 buflen -= n; in _zed_event_add_int16_array() 479 buflen -= n; in _zed_event_add_uint16_array() 509 buflen -= n; in _zed_event_add_int32_array() 539 buflen -= n; in _zed_event_add_uint32_array() 569 buflen -= n; in _zed_event_add_int64_array() [all …]
|
/freebsd/sys/compat/linux/ |
H A D | linux_getcwd.c | 59 size_t buflen; in linux_getcwd() local 62 buflen = uap->bufsize; in linux_getcwd() 63 if (__predict_false(buflen < 2)) in linux_getcwd() 65 if (buflen > LINUX_PATH_MAX) in linux_getcwd() 66 buflen = LINUX_PATH_MAX; in linux_getcwd() 68 buf = malloc(buflen, M_TEMP, M_WAITOK); in linux_getcwd() 69 error = vn_getcwd(buf, &retbuf, &buflen); in linux_getcwd() 73 error = copyout(retbuf, uap->buf, buflen); in linux_getcwd() 75 td->td_retval[0] = buflen; in linux_getcwd()
|
/freebsd/usr.bin/random/ |
H A D | randomize_fd.c | 101 size_t bufc, buflen; in randomize_fd() local 111 buflen = sizeof(u_char) * MAXBSIZE; in randomize_fd() 112 buf = (u_char *)malloc(buflen); in randomize_fd() 119 len = read(fd, buf, buflen); in randomize_fd() 125 } else if ((size_t)len < buflen) in randomize_fd() 126 buflen = (size_t)len; in randomize_fd() 133 if (i == buflen) { in randomize_fd() 146 buflen = i + (size_t)len; in randomize_fd() 152 buflen *= 2; in randomize_fd() 165 buflen = i + (size_t)len; in randomize_fd() [all …]
|
/freebsd/kerberos5/lib/libgssapi_krb5/ |
H A D | pname_to_uid.c | 44 size_t buflen; in _gsskrb5_pname_to_uid() local 58 buflen = buflen_hint; in _gsskrb5_pname_to_uid() 62 if (buflen > sizeof(buf)) in _gsskrb5_pname_to_uid() 63 bufp = malloc(buflen); in _gsskrb5_pname_to_uid() 66 error = getpwnam_r(lname, &pwd, bufp, buflen, &pw); in _gsskrb5_pname_to_uid() 69 if (buflen > sizeof(buf)) in _gsskrb5_pname_to_uid() 71 buflen += 1024; in _gsskrb5_pname_to_uid() 72 if (buflen > buflen_hint) in _gsskrb5_pname_to_uid() 73 buflen_hint = buflen; in _gsskrb5_pname_to_uid() 81 if (bufp != NULL && buflen > sizeof(buf)) in _gsskrb5_pname_to_uid()
|
/freebsd/lib/libc/gen/ |
H A D | getentropy.c | 80 getentropy_fallback(void *buf, size_t buflen) in getentropy_fallback() argument 87 if (buf == NULL && buflen > 0) { in getentropy_fallback() 91 if (arnd_sysctl(buf, buflen) != buflen) { in getentropy_fallback() 108 getentropy(void *buf, size_t buflen) in getentropy() argument 113 if (buflen > 256) { in getentropy() 120 while (buflen > 0) { in getentropy() 122 rd = getrandom(buf, buflen, 0); in getentropy() 144 return (getentropy_fallback(buf, buflen)); in getentropy() 152 buflen -= rd; in getentropy()
|
/freebsd/crypto/heimdal/lib/roken/ |
H A D | strerror_r.c | 46 rk_strerror_r(int eno, char * strerrbuf, size_t buflen) in rk_strerror_r() argument 50 err = strerror_s(strerrbuf, buflen, eno); in rk_strerror_r() 53 code = sprintf_s(strerrbuf, buflen, "Error % occurred.", eno); in rk_strerror_r() 63 rk_strerror_r(int eno, char *strerrbuf, size_t buflen) in rk_strerror_r() argument 68 str = strerror_r(eno, strerrbuf, buflen); in rk_strerror_r() 70 if (strlcpy(strerrbuf, str, buflen) >= buflen) in rk_strerror_r() 75 ret = strlcpy(strerrbuf, strerror(eno), buflen); in rk_strerror_r() 76 if (ret > buflen) in rk_strerror_r()
|
/freebsd/cddl/contrib/opensolaris/lib/libcmdutils/common/ |
H A D | nicenum.c | 40 nicenum_scale(uint64_t n, size_t units, char *buf, size_t buflen, in nicenum_scale() argument 87 rc = snprintf(buf, buflen, "%llu", n); in nicenum_scale() 93 rc = snprintf(buf, buflen, "%llu%c", n / divisor, u); in nicenum_scale() 107 if ((rc = snprintf(buf, buflen, "%.*f%c", i, in nicenum_scale() 113 if (rc + 1 > buflen || rc < 0) in nicenum_scale() 120 if (buflen > 10) in nicenum_scale() 121 (void) strlcpy(buf, "<overflow>", buflen); in nicenum_scale() 123 (void) strlcpy(buf, "??", buflen); in nicenum_scale() 127 nicenum(uint64_t num, char *buf, size_t buflen) in nicenum() argument 129 nicenum_scale(num, 1, buf, buflen, 0); in nicenum()
|
/freebsd/sys/netgraph/ |
H A D | ng_parse.c | 730 *buflen = slen + 1; in ng_string_parse() 758 if (*buflen < 1) in ng_string_getDefault() 761 *buflen = 1; in ng_string_getDefault() 799 *buflen = fi->bufSize; in ng_fixedstring_parse() 902 *buflen = 2 + slen; in ng_sizedstring_parse() 930 if (*buflen < 2) in ng_sizedstring_getDefault() 933 *buflen = 2; in ng_sizedstring_getDefault() 968 *buflen = 4; in ng_ipaddr_parse() 997 *buflen = sizeof(ip); in ng_ipaddr_getDefault() 1119 *buflen = arraylen; in ng_bytearray_parse() [all …]
|
/freebsd/contrib/wpa/src/utils/ |
H A D | wpa_debug.c | 132 ssize_t buflen; in wpa_debug_open_linux_tracing() local 143 if (buflen < 0) { in wpa_debug_open_linux_tracing() 147 buf[buflen] = '\0'; in wpa_debug_open_linux_tracing() 643 int buflen; in wpa_msg() local 651 buf = os_malloc(buflen); in wpa_msg() 681 int buflen; in wpa_msg_ctrl() local 709 int buflen; in wpa_msg_global() local 736 int buflen; in wpa_msg_global_ctrl() local 764 int buflen; in wpa_msg_no_global() local 791 int buflen; in wpa_msg_global_only() local [all …]
|
/freebsd/usr.sbin/ofwdump/ |
H A D | ofw_util.c | 136 d.of_buflen = buflen; in ofw_nextprop() 165 d.of_buflen = buflen; in ofw_getprop() 173 int buflen) in ofw_setprop() argument 180 d.of_buflen = buflen; in ofw_setprop() 181 d.of_buf = ofw_malloc(buflen); in ofw_setprop() 182 memcpy(d.of_buf, buf, buflen); in ofw_setprop() 202 int *buflen, int reserve) in ofw_getprop_alloc() argument 211 if (*buflen < len + reserve) { in ofw_getprop_alloc() 214 *buflen = len + reserve + OFIOCMAXVALUE; in ofw_getprop_alloc() 215 *buf = ofw_malloc(*buflen); in ofw_getprop_alloc() [all …]
|
/freebsd/contrib/libpcap/ |
H A D | bpf_filter.c | 123 if (k > buflen || sizeof(int32_t) > buflen - k) { in pcap_filter_with_aux_data() 131 if (k > buflen || sizeof(int16_t) > buflen - k) { in pcap_filter_with_aux_data() 162 if (k >= buflen) { in pcap_filter_with_aux_data() 181 if (pc->k > buflen || X > buflen - pc->k || in pcap_filter_with_aux_data() 182 sizeof(int32_t) > buflen - k) { in pcap_filter_with_aux_data() 190 if (X > buflen || pc->k > buflen - X || in pcap_filter_with_aux_data() 191 sizeof(int16_t) > buflen - k) { in pcap_filter_with_aux_data() 199 if (pc->k >= buflen || X >= buflen - pc->k) { in pcap_filter_with_aux_data() 207 if (k >= buflen) { in pcap_filter_with_aux_data() 392 u_int buflen) in pcap_filter() argument [all …]
|
/freebsd/contrib/telnet/libtelnet/ |
H A D | krb4encpwd.c | 348 int cnt, buflen; 354 buflen -= 1; 364 BUMP(buf, buflen); 367 ADDC(buf, buflen, '"'); 369 ADDC(buf, buflen, data[i]); 370 ADDC(buf, buflen, '"'); 371 ADDC(buf, buflen, '\0'); 388 strncpy((char *)buf, lbuf, buflen); 390 BUMP(buf, buflen); 393 strncpy((char *)buf, lbuf, buflen); [all …]
|
/freebsd/sys/kern/ |
H A D | sys_getrandom.c | 48 kern_getrandom(struct thread *td, void *user_buf, size_t buflen, in kern_getrandom() argument 57 if (buflen > IOSIZE_MAX) in kern_getrandom() 94 if (buflen == 0) { in kern_getrandom() 100 aiov.iov_len = buflen; in kern_getrandom() 104 auio.uio_resid = buflen; in kern_getrandom() 111 td->td_retval[0] = buflen - auio.uio_resid; in kern_getrandom() 118 size_t buflen; member 126 return (kern_getrandom(td, uap->buf, uap->buflen, uap->flags)); in sys_getrandom()
|