| /trueos/lib/libc/nameser/ |
| HD | ns_print.c | 59 char **buf, size_t *buflen); 62 char **buf, size_t *buflen); 63 static void addlen(size_t len, char **buf, size_t *buflen); 65 char **buf, size_t *buflen); 67 char **buf, size_t *buflen); 91 char *buf, size_t buflen) in ns_sprintrr() argument 98 name_ctx, origin, buf, buflen); in ns_sprintrr() 113 char *buf, size_t buflen) in ns_sprintrrf() argument 127 T(addstr("\t\t\t", 3, &buf, &buflen)); in ns_sprintrrf() 133 T(addstr("@\t\t\t", 4, &buf, &buflen)); in ns_sprintrrf() [all …]
|
| /trueos/lib/libcrypt/ |
| HD | crypt-sha512.c | 63 crypt_sha512_r(const char *key, const char *salt, char *buffer, int buflen) in crypt_sha512_r() argument 213 cp = stpncpy(buffer, sha512_salt_prefix, MAX(0, buflen)); in crypt_sha512_r() 214 buflen -= sizeof(sha512_salt_prefix) - 1; in crypt_sha512_r() 217 n = snprintf(cp, MAX(0, buflen), "%s%zu$", in crypt_sha512_r() 221 buflen -= n; in crypt_sha512_r() 224 cp = stpncpy(cp, salt, MIN((size_t)MAX(0, buflen), salt_len)); in crypt_sha512_r() 225 buflen -= MIN((size_t)MAX(0, buflen), salt_len); in crypt_sha512_r() 227 if (buflen > 0) { in crypt_sha512_r() 229 --buflen; in crypt_sha512_r() 232 b64_from_24bit(alt_result[0], alt_result[21], alt_result[42], 4, &buflen, &cp); in crypt_sha512_r() [all …]
|
| HD | crypt-sha256.c | 63 crypt_sha256_r(const char *key, const char *salt, char *buffer, int buflen) in crypt_sha256_r() argument 213 cp = stpncpy(buffer, sha256_salt_prefix, MAX(0, buflen)); in crypt_sha256_r() 214 buflen -= sizeof(sha256_salt_prefix) - 1; in crypt_sha256_r() 217 n = snprintf(cp, MAX(0, buflen), "%s%zu$", in crypt_sha256_r() 221 buflen -= n; in crypt_sha256_r() 224 cp = stpncpy(cp, salt, MIN((size_t)MAX(0, buflen), salt_len)); in crypt_sha256_r() 225 buflen -= MIN((size_t)MAX(0, buflen), salt_len); in crypt_sha256_r() 227 if (buflen > 0) { in crypt_sha256_r() 229 --buflen; in crypt_sha256_r() 232 b64_from_24bit(alt_result[0], alt_result[10], alt_result[20], 4, &buflen, &cp); in crypt_sha256_r() [all …]
|
| /trueos/lib/libugidfw/ |
| HD | ugidfw.c | 60 bsde_rule_to_string(struct mac_bsdextended_rule *rule, char *buf, size_t buflen) in bsde_rule_to_string() argument 70 left = buflen; in bsde_rule_to_string() 511 size_t buflen, char *errstr){ in bsde_parse_uidrange() argument 527 len = snprintf(errstr, buflen, in bsde_parse_uidrange() 545 len = snprintf(errstr, buflen, in bsde_parse_uidrange() 560 size_t buflen, char *errstr){ in bsde_parse_gidrange() argument 576 len = snprintf(errstr, buflen, in bsde_parse_gidrange() 594 len = snprintf(errstr, buflen, in bsde_parse_gidrange() 609 struct mac_bsdextended_subject *subject, size_t buflen, char *errstr) in bsde_parse_subject() argument 634 len = snprintf(errstr, buflen, "uid short"); in bsde_parse_subject() [all …]
|
| HD | 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);
|
| /trueos/contrib/wpa/src/ap/ |
| HD | ctrl_iface_ap.c | 25 char *buf, size_t buflen) in hostapd_get_sta_conn_time() argument 36 ret = os_snprintf(buf + len, buflen - len, "connected_time=%u\n", in hostapd_get_sta_conn_time() 38 if (ret < 0 || (size_t) ret >= buflen - len) in hostapd_get_sta_conn_time() 48 char *buf, size_t buflen) in hostapd_ctrl_iface_sta_mib() argument 53 ret = os_snprintf(buf, buflen, "FAIL\n"); in hostapd_ctrl_iface_sta_mib() 54 if (ret < 0 || (size_t) ret >= buflen) in hostapd_ctrl_iface_sta_mib() 60 ret = os_snprintf(buf + len, buflen - len, MACSTR "\n", in hostapd_ctrl_iface_sta_mib() 62 if (ret < 0 || (size_t) ret >= buflen - len) in hostapd_ctrl_iface_sta_mib() 66 res = ieee802_11_get_mib_sta(hapd, sta, buf + len, buflen - len); in hostapd_ctrl_iface_sta_mib() 69 res = wpa_get_mib_sta(sta->wpa_sm, buf + len, buflen - len); in hostapd_ctrl_iface_sta_mib() [all …]
|
| /trueos/sys/netgraph/ |
| HD | ng_parse.c | 106 u_char *const buf, int *buflen, enum comptype ctype); 112 int *buflen, enum comptype ctype); 148 const char *string, int *off, u_char *buf, int *buflen) in ng_parse() argument 150 return INVOKE(type, parse)(type, string, off, buf, buf, buflen); in ng_parse() 169 ng_parse_getDefault(const struct ng_parse_type *type, u_char *buf, int *buflen) in ng_parse_getDefault() argument 175 return (*func)(type, buf, buf, buflen); in ng_parse_getDefault() 186 u_char *const buf, int *buflen) in ng_struct_parse() argument 188 return ng_parse_composite(type, s, off, start, buf, buflen, CT_STRUCT); in ng_struct_parse() 200 const u_char *const start, u_char *buf, int *buflen) in ng_struct_getDefault() argument 205 "{}", &off, start, buf, buflen, CT_STRUCT); in ng_struct_getDefault() [all …]
|
| /trueos/games/random/ |
| HD | randomize_fd.c | 102 size_t bufc, buflen; in randomize_fd() local 112 buflen = sizeof(u_char) * MAXBSIZE; in randomize_fd() 113 buf = (u_char *)malloc(buflen); in randomize_fd() 120 len = read(fd, buf, buflen); in randomize_fd() 126 } else if ((size_t)len < buflen) in randomize_fd() 127 buflen = (size_t)len; in randomize_fd() 133 for (i = bufc; i <= buflen && bufleft >= 0; i++, bufleft--) { in randomize_fd() 134 if (i == buflen) { in randomize_fd() 140 len = read(fd, &buf[i], buflen - i); in randomize_fd() 146 } else if (len < (ssize_t)(buflen - i)) in randomize_fd() [all …]
|
| /trueos/kerberos5/lib/libgssapi_krb5/ |
| HD | pname_to_uid.c | 43 size_t buflen; in _gsskrb5_pname_to_uid() local 57 buflen = buflen_hint; in _gsskrb5_pname_to_uid() 61 if (buflen > sizeof(buf)) in _gsskrb5_pname_to_uid() 62 bufp = malloc(buflen); in _gsskrb5_pname_to_uid() 65 error = getpwnam_r(lname, &pwd, bufp, buflen, &pw); in _gsskrb5_pname_to_uid() 68 if (buflen > sizeof(buf)) in _gsskrb5_pname_to_uid() 70 buflen += 1024; in _gsskrb5_pname_to_uid() 71 if (buflen > buflen_hint) in _gsskrb5_pname_to_uid() 72 buflen_hint = buflen; in _gsskrb5_pname_to_uid() 80 if (bufp != NULL && buflen > sizeof(buf)) in _gsskrb5_pname_to_uid()
|
| /trueos/crypto/heimdal/lib/roken/ |
| HD | 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()
|
| /trueos/usr.sbin/pw/ |
| HD | fileupd.c | 45 extendline(char **buf, int * buflen, int needed) in extendline() argument 47 if (needed > *buflen) { in extendline() 52 *buflen = needed; in extendline() 54 return *buflen; in extendline() 58 extendarray(char ***buf, int * buflen, int needed) in extendarray() argument 60 if (needed > *buflen) { in extendarray() 65 *buflen = needed; in extendarray() 67 return *buflen; in extendarray()
|
| /trueos/usr.sbin/ofwdump/ |
| HD | ofw_util.c | 125 ofw_firstprop(int fd, phandle_t node, char *buf, int buflen) in ofw_firstprop() argument 128 return (ofw_nextprop(fd, node, NULL, buf, buflen)); in ofw_firstprop() 132 ofw_nextprop(int fd, phandle_t node, const char *prev, char *buf, int buflen) in ofw_nextprop() argument 139 d.of_buflen = buflen; in ofw_nextprop() 161 ofw_getprop(int fd, phandle_t node, const char *name, void *buf, int buflen) in ofw_getprop() argument 168 d.of_buflen = buflen; in ofw_getprop() 176 int buflen) in ofw_setprop() argument 183 d.of_buflen = buflen; in ofw_setprop() 184 d.of_buf = ofw_malloc(buflen); in ofw_setprop() 185 memcpy(d.of_buf, buf, buflen); in ofw_setprop() [all …]
|
| /trueos/usr.sbin/eeprom/ |
| HD | ofw_options.c | 77 ofwo_printprop(const char *prop, const char* buf, int buflen) in ofwo_printprop() argument 80 printf("%s: %.*s\n", prop, buflen, buf); in ofwo_printprop() 85 int buflen, const char *val) in ofwo_oemlogo() argument 111 if (buflen != 0) in ofwo_oemlogo() 115 buflen); in ofwo_oemlogo() 121 int buflen, const char *val) in ofwo_secmode() argument 129 if ((res = ofwo_setstr(fd, buf, buflen, exent->ex_prop, in ofwo_secmode() 138 return (ofwo_setstr(fd, buf, buflen, exent->ex_prop, in ofwo_secmode() 143 ofwo_printprop(exent->ex_prop, (const char *)buf, buflen); in ofwo_secmode() 149 int buflen, const char *val) in ofwo_secpwd() argument [all …]
|
| /trueos/contrib/telnet/libtelnet/ |
| HD | krb4encpwd.c | 354 krb4encpwd_printsub(data, cnt, buf, buflen) in krb4encpwd_printsub() argument 356 int cnt, buflen; 361 buf[buflen-1] = '\0'; /* make sure its NULL terminated */ 362 buflen -= 1; 366 strncpy((char *)buf, " REJECT ", buflen); 370 strncpy((char *)buf, " ACCEPT ", buflen); 372 BUMP(buf, buflen); 375 ADDC(buf, buflen, '"'); 377 ADDC(buf, buflen, data[i]); 378 ADDC(buf, buflen, '"'); [all …]
|
| HD | kerberos.c | 420 kerberos4_printsub(unsigned char *data, int cnt, unsigned char *buf, int buflen) in kerberos4_printsub() argument 425 buf[buflen-1] = '\0'; /* make sure its NULL terminated */ in kerberos4_printsub() 426 buflen -= 1; in kerberos4_printsub() 430 strncpy((char *)buf, " REJECT ", buflen); in kerberos4_printsub() 434 strncpy((char *)buf, " ACCEPT ", buflen); in kerberos4_printsub() 436 BUMP(buf, buflen); in kerberos4_printsub() 439 ADDC(buf, buflen, '"'); in kerberos4_printsub() 441 ADDC(buf, buflen, data[i]); in kerberos4_printsub() 442 ADDC(buf, buflen, '"'); in kerberos4_printsub() 443 ADDC(buf, buflen, '\0'); in kerberos4_printsub() [all …]
|
| HD | rsaencpwd.c | 405 rsaencpwd_printsub(data, cnt, buf, buflen) in rsaencpwd_printsub() argument 407 int cnt, buflen; 412 buf[buflen-1] = '\0'; /* make sure its NULL terminated */ 413 buflen -= 1; 417 strncpy((char *)buf, " REJECT ", buflen); 421 strncpy((char *)buf, " ACCEPT ", buflen); 423 BUMP(buf, buflen); 426 ADDC(buf, buflen, '"'); 428 ADDC(buf, buflen, data[i]); 429 ADDC(buf, buflen, '"'); [all …]
|
| HD | sra.c | 358 sra_printsub(unsigned char *data, int cnt, unsigned char *buf, int buflen) in sra_printsub() argument 363 buf[buflen-1] = '\0'; /* make sure its NULL terminated */ in sra_printsub() 364 buflen -= 1; in sra_printsub() 369 strncpy((char *)buf, " CONTINUE ", buflen); in sra_printsub() 373 strncpy((char *)buf, " REJECT ", buflen); in sra_printsub() 377 strncpy((char *)buf, " ACCEPT ", buflen); in sra_printsub() 380 BUMP(buf, buflen); in sra_printsub() 383 ADDC(buf, buflen, '"'); in sra_printsub() 385 ADDC(buf, buflen, data[i]); in sra_printsub() 386 ADDC(buf, buflen, '"'); in sra_printsub() [all …]
|
| /trueos/sbin/dmesg/ |
| HD | dmesg.c | 81 size_t buflen, bufpos; in main() local 117 if (sysctlbyname("kern.msgbuf", NULL, &buflen, NULL, 0) == -1) in main() 119 if ((bp = malloc(buflen + 2)) == NULL) in main() 121 if (sysctlbyname("kern.msgbuf", bp, &buflen, NULL, 0) == -1) in main() 153 buflen = cur.msg_size; in main() 160 if (buflen == 0 || bp[buflen - 1] != '\n') in main() 161 bp[buflen++] = '\n'; in main() 162 bp[buflen] = '\0'; in main() 164 if ((visbp = malloc(4 * buflen + 1)) == NULL) in main() 173 ep = &bp[buflen]; in main()
|
| /trueos/sys/net/ |
| HD | bpf_filter.c | 177 bpf_filter(const struct bpf_insn *pc, u_char *p, u_int wirelen, u_int buflen) in bpf_filter() argument 210 if (k > buflen || sizeof(int32_t) > buflen - k) { in bpf_filter() 214 if (buflen != 0) in bpf_filter() 234 if (k > buflen || sizeof(int16_t) > buflen - k) { in bpf_filter() 238 if (buflen != 0) in bpf_filter() 251 if (k >= buflen) { in bpf_filter() 255 if (buflen != 0) in bpf_filter() 278 if (pc->k > buflen || X > buflen - pc->k || in bpf_filter() 279 sizeof(int32_t) > buflen - k) { in bpf_filter() 283 if (buflen != 0) in bpf_filter() [all …]
|
| /trueos/lib/libc/gen/ |
| HD | auxv.c | 114 _elf_aux_info(int aux, void *buf, int buflen) in _elf_aux_info() argument 125 if (canary != NULL && canary_len >= buflen) { in _elf_aux_info() 126 memcpy(buf, canary, buflen); in _elf_aux_info() 134 if (pagesizes != NULL && pagesizes_len >= buflen) { in _elf_aux_info() 135 memcpy(buf, pagesizes, buflen); in _elf_aux_info() 142 if (buflen == sizeof(int)) { in _elf_aux_info() 152 if (buflen == sizeof(int)) { in _elf_aux_info() 162 if (buflen == sizeof(int)) { in _elf_aux_info() 172 if (buflen == sizeof(void *)) { in _elf_aux_info()
|
| /trueos/crypto/heimdal/appl/telnet/libtelnet/ |
| HD | rsaencpwd.c | 407 unsigned char * buf, size_t buflen) in rsaencpwd_printsub() argument 411 buf[buflen-1] = '\0'; /* make sure it's NULL terminated */ in rsaencpwd_printsub() 412 buflen -= 1; in rsaencpwd_printsub() 416 strlcpy((char *)buf, " REJECT ", buflen); in rsaencpwd_printsub() 420 strlcpy((char *)buf, " ACCEPT ", buflen); in rsaencpwd_printsub() 422 BUMP(buf, buflen); in rsaencpwd_printsub() 425 ADDC(buf, buflen, '"'); in rsaencpwd_printsub() 427 ADDC(buf, buflen, data[i]); in rsaencpwd_printsub() 428 ADDC(buf, buflen, '"'); in rsaencpwd_printsub() 429 ADDC(buf, buflen, '\0'); in rsaencpwd_printsub() [all …]
|
| /trueos/contrib/jansson/test/suites/api/ |
| HD | test_load_callback.c | 21 static size_t greedy_reader(void *buf, size_t buflen, void *arg) in greedy_reader() argument 24 if (buflen > s->cap - s->off) in greedy_reader() 25 buflen = s->cap - s->off; in greedy_reader() 26 if (buflen > 0) { in greedy_reader() 27 memcpy(buf, s->buf + s->off, buflen); in greedy_reader() 28 s->off += buflen; in greedy_reader() 29 return buflen; in greedy_reader()
|
| /trueos/crypto/openssl/crypto/ecdh/ |
| HD | ech_ossl.c | 119 size_t buflen, len; in ecdh_compute_key() local 167 buflen = (EC_GROUP_get_degree(group) + 7) / 8; in ecdh_compute_key() 169 if (len > buflen) { in ecdh_compute_key() 173 if ((buf = OPENSSL_malloc(buflen)) == NULL) { in ecdh_compute_key() 178 memset(buf, 0, buflen - len); in ecdh_compute_key() 179 if (len != (size_t)BN_bn2bin(x, buf + buflen - len)) { in ecdh_compute_key() 185 if (KDF(buf, buflen, out, &outlen) == NULL) { in ecdh_compute_key() 192 if (outlen > buflen) in ecdh_compute_key() 193 outlen = buflen; in ecdh_compute_key()
|
| /trueos/tools/regression/lib/libc/nss/ |
| HD | test-getaddr.c | 161 sdump_addrinfo(struct addrinfo *ai, char *buffer, size_t buflen) in sdump_addrinfo() argument 165 written = snprintf(buffer, buflen, "%d %d %d %d %d ", in sdump_addrinfo() 169 if (written > buflen) in sdump_addrinfo() 171 buflen -= written; in sdump_addrinfo() 173 written = snprintf(buffer, buflen, "%s ", in sdump_addrinfo() 176 if (written > buflen) in sdump_addrinfo() 178 buflen -= written; in sdump_addrinfo() 181 written = snprintf(buffer, buflen, "(null)"); in sdump_addrinfo() 183 if (written > buflen) in sdump_addrinfo() 185 buflen -= written; in sdump_addrinfo() [all …]
|
| HD | test-gethostby.c | 424 sdump_hostent(struct hostent *ht, char *buffer, size_t buflen) in sdump_hostent() argument 430 written = snprintf(buffer, buflen, "%s %d %d", in sdump_hostent() 433 if (written > buflen) in sdump_hostent() 435 buflen -= written; in sdump_hostent() 440 written = snprintf(buffer, buflen, " %s",*cp); in sdump_hostent() 442 if (written > buflen) in sdump_hostent() 444 buflen -= written; in sdump_hostent() 446 if (buflen == 0) in sdump_hostent() 450 written = snprintf(buffer, buflen, " noaliases"); in sdump_hostent() 452 if (written > buflen) in sdump_hostent() [all …]
|