| /freebsd/contrib/unbound/sldns/ |
| H A D | wire2str.c | 271 size_t slen = (size_t)sldns_wire2str_pkt_buf(data, len, NULL, 0); in sldns_wire2str_pkt() local 272 char* result = (char*)malloc(slen+1); in sldns_wire2str_pkt() 274 sldns_wire2str_pkt_buf(data, len, result, slen+1); in sldns_wire2str_pkt() 280 size_t slen = (size_t)sldns_wire2str_rr_buf(rr, len, NULL, 0); in sldns_wire2str_rr() local 281 char* result = (char*)malloc(slen+1); in sldns_wire2str_rr() 283 sldns_wire2str_rr_buf(rr, len, result, slen+1); in sldns_wire2str_rr() 303 size_t slen=(size_t)sldns_wire2str_dname_buf(dname, dname_len, NULL, 0); in sldns_wire2str_dname() local 304 char* result = (char*)malloc(slen+1); in sldns_wire2str_dname() 306 sldns_wire2str_dname_buf(dname, dname_len, result, slen+1); in sldns_wire2str_dname() 317 int sldns_wire2str_pkt_buf(uint8_t* d, size_t dlen, char* s, size_t slen) in sldns_wire2str_pkt_buf() argument [all …]
|
| /freebsd/crypto/openssh/regress/unittests/test_helper/ |
| H A D | fuzz.c | 66 size_t slen; member 110 fuzz->o1, fuzz->slen * 8, fuzz->o1); in fuzz_fmt() 115 (((fuzz_ullong)fuzz->o2) * fuzz->slen * 8) + fuzz->o1, in fuzz_fmt() 116 ((fuzz_ullong)fuzz->slen * 8) * fuzz->slen * 8, in fuzz_fmt() 122 fuzz->o1, fuzz->slen, fuzz->o1); in fuzz_fmt() 127 (((fuzz_ullong)fuzz->o2) * fuzz->slen) + fuzz->o1, in fuzz_fmt() 128 ((fuzz_ullong)fuzz->slen) * fuzz->slen, in fuzz_fmt() 134 fuzz->o1, fuzz->slen, fuzz->o1); in fuzz_fmt() 139 fuzz->o1, fuzz->slen, fuzz->o1); in fuzz_fmt() 146 fuzz->slen * (fuzz_ullong)64, fuzz->o1, in fuzz_fmt() [all …]
|
| /freebsd/include/ssp/ |
| H A D | wchar.h | 62 const size_t slen = __ssp_wbos(buf); variable 64 if (len > slen) 75 const size_t slen = __ssp_wbos(buf); variable 77 if (len > slen) 88 const size_t slen = __ssp_wbos(buf); variable 90 if (len > slen) 99 const size_t slen = __ssp_wbos(buf); variable 101 if (len > slen) 109 const size_t slen = __ssp_wbos(buf); variable 112 if (len >= slen) [all …]
|
| /freebsd/sys/contrib/libsodium/src/libsodium/crypto_aead/chacha20poly1305/sodium/ |
| H A D | aead_chacha20poly1305.c | 33 unsigned char slen[8U]; in crypto_aead_chacha20poly1305_encrypt_detached() local 41 STORE64_LE(slen, (uint64_t) adlen); in crypto_aead_chacha20poly1305_encrypt_detached() 42 crypto_onetimeauth_poly1305_update(&state, slen, sizeof slen); in crypto_aead_chacha20poly1305_encrypt_detached() 47 STORE64_LE(slen, (uint64_t) mlen); in crypto_aead_chacha20poly1305_encrypt_detached() 48 crypto_onetimeauth_poly1305_update(&state, slen, sizeof slen); in crypto_aead_chacha20poly1305_encrypt_detached() 104 unsigned char slen[8U]; in crypto_aead_chacha20poly1305_ietf_encrypt_detached() local 119 STORE64_LE(slen, (uint64_t) adlen); in crypto_aead_chacha20poly1305_ietf_encrypt_detached() 120 crypto_onetimeauth_poly1305_update(&state, slen, sizeof slen); in crypto_aead_chacha20poly1305_ietf_encrypt_detached() 122 STORE64_LE(slen, (uint64_t) mlen); in crypto_aead_chacha20poly1305_ietf_encrypt_detached() 123 crypto_onetimeauth_poly1305_update(&state, slen, sizeof slen); in crypto_aead_chacha20poly1305_ietf_encrypt_detached() [all …]
|
| /freebsd/contrib/bearssl/src/ec/ |
| H A D | ecdsa_atr.c | 44 size_t zlen, rlen, slen, off; in br_ecdsa_asn1_to_raw() local 104 slen = buf[off ++]; in br_ecdsa_asn1_to_raw() 105 if (slen >= 0x80 || slen != sig_len - off) { in br_ecdsa_asn1_to_raw() 117 while (slen > 0 && *s == 0) { in br_ecdsa_asn1_to_raw() 118 slen --; in br_ecdsa_asn1_to_raw() 127 zlen = rlen > slen ? rlen : slen; in br_ecdsa_asn1_to_raw() 131 memcpy(tmp + sig_len - slen, s, slen); in br_ecdsa_asn1_to_raw()
|
| H A D | ecdsa_rta.c | 58 size_t hlen, rlen, slen, zlen, off; in br_ecdsa_raw_to_asn1() local 71 slen = asn1_int_length(buf + hlen, hlen); in br_ecdsa_raw_to_asn1() 72 if (rlen > 125 || slen > 125) { in br_ecdsa_raw_to_asn1() 80 zlen = rlen + slen + 4; in br_ecdsa_raw_to_asn1() 107 tmp[off ++] = slen; in br_ecdsa_raw_to_asn1() 108 if (slen > hlen) { in br_ecdsa_raw_to_asn1() 112 memcpy(tmp + off, buf + sig_len - slen, slen); in br_ecdsa_raw_to_asn1() 114 off += slen; in br_ecdsa_raw_to_asn1()
|
| /freebsd/contrib/unbound/dnstap/ |
| H A D | dnstap_fstrm.c | 178 size_t remain, slen = sizeof(buf); in fstrm_describe_control() local 189 (void)sldns_str_print(&str, &slen, "accept"); in fstrm_describe_control() 191 (void)sldns_str_print(&str, &slen, "start"); in fstrm_describe_control() 193 (void)sldns_str_print(&str, &slen, "stop"); in fstrm_describe_control() 195 (void)sldns_str_print(&str, &slen, "ready"); in fstrm_describe_control() 197 (void)sldns_str_print(&str, &slen, "finish"); in fstrm_describe_control() 199 (void)sldns_str_print(&str, &slen, "type%d", (int)frametype); in fstrm_describe_control() 209 (void)sldns_str_print(&str, &slen, "malformed_field"); in fstrm_describe_control() 214 (void)sldns_str_print(&str, &slen, " content-type("); in fstrm_describe_control() 218 (void)sldns_str_print(&str, &slen, "%s", tempf); in fstrm_describe_control() [all …]
|
| /freebsd/lib/libc/string/ |
| H A D | wcsxfrm.c | 44 size_t slen; in wcsxfrm_l() local 56 ((slen = _collate_wxfrm(table, src, dest, len)) == (size_t)-1)) { in wcsxfrm_l() 61 if (len > slen) { in wcsxfrm_l() 62 dest[slen] = 0; in wcsxfrm_l() 67 return (slen); in wcsxfrm_l() 70 slen = wcslen(src); in wcsxfrm_l() 71 if (slen < len) in wcsxfrm_l() 77 return (slen); in wcsxfrm_l()
|
| /freebsd/crypto/openssl/providers/implementations/kem/ |
| H A D | ml_kem_kem.c | 147 unsigned char *shsec, size_t *slen) in ml_kem_encapsulate() argument 165 if (clen == NULL && slen == NULL) in ml_kem_encapsulate() 169 if (slen != NULL) in ml_kem_encapsulate() 170 *slen = encap_slen; in ml_kem_encapsulate() 191 if (slen == NULL) { in ml_kem_encapsulate() 195 } else if (*slen < encap_slen) { in ml_kem_encapsulate() 200 *slen = encap_slen; in ml_kem_encapsulate() 224 static int ml_kem_decapsulate(void *vctx, uint8_t *shsec, size_t *slen, in ml_kem_decapsulate() argument 237 if (slen == NULL) in ml_kem_decapsulate() 239 *slen = ML_KEM_SHARED_SECRET_BYTES; in ml_kem_decapsulate() [all …]
|
| H A D | mlx_kem.c | 107 unsigned char *shsec, size_t *slen) in mlx_kem_encapsulate() argument 127 if (clen == NULL && slen == NULL) in mlx_kem_encapsulate() 131 if (slen != NULL) in mlx_kem_encapsulate() 132 *slen = encap_slen; in mlx_kem_encapsulate() 153 if (slen == NULL) { in mlx_kem_encapsulate() 157 } else if (*slen < encap_slen) { in mlx_kem_encapsulate() 162 *slen = encap_slen; in mlx_kem_encapsulate() 244 static int mlx_kem_decapsulate(void *vctx, uint8_t *shsec, size_t *slen, in mlx_kem_decapsulate() argument 263 if (slen == NULL) in mlx_kem_decapsulate() 265 *slen = decap_slen; in mlx_kem_decapsulate() [all …]
|
| /freebsd/contrib/wpa/src/p2p/ |
| H A D | p2p_sd.c | 333 u16 slen; in p2p_rx_gas_initial_req() local 363 slen = *pos++; in p2p_rx_gas_initial_req() 364 if (slen > end - pos || slen < 2) { in p2p_rx_gas_initial_req() 368 next = pos + slen; in p2p_rx_gas_initial_req() 381 slen = WPA_GET_LE16(pos); in p2p_rx_gas_initial_req() 383 if (slen > end - pos) in p2p_rx_gas_initial_req() 385 end = pos + slen; in p2p_rx_gas_initial_req() 396 slen = WPA_GET_LE16(pos); in p2p_rx_gas_initial_req() 398 if (slen > end - pos || slen < 3 + 1) { in p2p_rx_gas_initial_req() 489 u16 slen; in p2p_rx_gas_initial_resp() local [all …]
|
| /freebsd/contrib/ntp/libntp/ |
| H A D | ntp_realpath.c | 105 ssize_t slen; in realpath1() local 194 slen = readlink(resolved, link_tgt, sizeof(link_tgt)); in realpath1() 195 if (slen <= 0 || slen >= (ssize_t)sizeof(link_tgt)) { in realpath1() 196 if (slen < 0) { in realpath1() 198 } else if (slen == 0) { in realpath1() 205 link_tgt[slen] = '\0'; in realpath1() 222 if (link_tgt[slen - 1] != '/') { in realpath1() 223 if (slen + 1 >= (ssize_t)sizeof(link_tgt)) { in realpath1() 227 link_tgt[slen] in realpath1() [all...] |
| /freebsd/lib/libc/stdio/ |
| H A D | mktemp.c | 52 mkostempsat(int dfd, char *path, int slen, int oflags) in mkostempsat() argument 56 return (_gettemp(dfd, path, &fd, 0, slen, oflags) ? fd : -1); in mkostempsat() 60 mkostemps(char *path, int slen, int oflags) in mkostemps() argument 64 return (_gettemp(AT_FDCWD, path, &fd, 0, slen, oflags) ? fd : -1); in mkostemps() 68 mkstemps(char *path, int slen) in mkstemps() argument 72 return (_gettemp(AT_FDCWD, path, &fd, 0, slen, 0) ? fd : -1); in mkstemps() 113 _gettemp(int dfd, char *path, int *doopen, int domkdir, int slen, int oflags) in _gettemp() argument 122 if ((doopen != NULL && domkdir) || slen < 0 || in _gettemp() 134 trv -= slen; in _gettemp()
|
| /freebsd/contrib/jemalloc/src/ |
| H A D | malloc_io.c | 350 #define APPEND_S(s, slen) do { \ in malloc_vsnprintf() 352 size_t cpylen = (slen <= size - i) ? slen : size - i; \ in malloc_vsnprintf() 355 i += slen; \ in malloc_vsnprintf() 357 #define APPEND_PADDED_S(s, slen, width, left_justify) do { \ in malloc_vsnprintf() 359 size_t pad_len = (width == -1) ? 0 : ((slen < (size_t)width) ? \ in malloc_vsnprintf() 360 (size_t)width - slen : 0); \ in malloc_vsnprintf() 372 APPEND_S(s, slen); \ in malloc_vsnprintf() 439 size_t slen; in malloc_vsnprintf() 563 ' ' : '-')), buf, &slen); in malloc_vsnprintf() 351 APPEND_S(s,slen) malloc_vsnprintf() argument 358 APPEND_PADDED_S(s,slen,width,left_justify) malloc_vsnprintf() argument 436 size_t slen; malloc_vsnprintf() local [all...] |
| /freebsd/sys/contrib/libsodium/src/libsodium/crypto_secretstream/xchacha20poly1305/ |
| H A D | secretstream_xchacha20poly1305.c | 119 unsigned char slen[8U]; in crypto_secretstream_xchacha20poly1305_push() local 150 STORE64_LE(slen, (uint64_t) adlen); in crypto_secretstream_xchacha20poly1305_push() 151 crypto_onetimeauth_poly1305_update(&poly1305_state, slen, sizeof slen); in crypto_secretstream_xchacha20poly1305_push() 152 STORE64_LE(slen, (sizeof block) + mlen); in crypto_secretstream_xchacha20poly1305_push() 153 crypto_onetimeauth_poly1305_update(&poly1305_state, slen, sizeof slen); in crypto_secretstream_xchacha20poly1305_push() 185 unsigned char slen[8U]; in crypto_secretstream_xchacha20poly1305_pull() local 226 STORE64_LE(slen, (uint64_t) adlen); in crypto_secretstream_xchacha20poly1305_pull() 227 crypto_onetimeauth_poly1305_update(&poly1305_state, slen, sizeof slen); in crypto_secretstream_xchacha20poly1305_pull() 228 STORE64_LE(slen, (sizeof block) + mlen); in crypto_secretstream_xchacha20poly1305_pull() 229 crypto_onetimeauth_poly1305_update(&poly1305_state, slen, sizeof slen); in crypto_secretstream_xchacha20poly1305_pull()
|
| /freebsd/sys/dev/speaker/ |
| H A D | spkr.c | 58 static void playstring(struct spkr_state *state, char *cp, size_t slen); 234 playstring(struct spkr_state *state, char *cp, size_t slen) in playstring() argument 238 #define GETNUM(cp, v) for(v=0; isdigit(cp[1]) && slen > 0; ) \ in playstring() 239 {v = v * 10 + (*++cp - '0'); slen--;} in playstring() 240 for (; slen--; cp++) { in playstring() 263 slen--; in playstring() 267 slen--; in playstring() 298 slen--; in playstring() 307 slen--; in playstring() 319 slen--; in playstring() [all …]
|
| /freebsd/contrib/wpa/wpa_supplicant/ |
| H A D | hs20_supplicant.c | 227 const u8 *data, size_t slen, u8 dialog_token) in hs20_parse_rx_hs20_anqp_resp() argument 233 if (slen < 2) in hs20_parse_rx_hs20_anqp_resp() 240 slen--; in hs20_parse_rx_hs20_anqp_resp() 243 slen--; in hs20_parse_rx_hs20_anqp_resp() 249 wpa_hexdump_ascii(MSG_DEBUG, "HS Capability List", pos, slen); in hs20_parse_rx_hs20_anqp_resp() 253 wpabuf_alloc_copy(pos, slen); in hs20_parse_rx_hs20_anqp_resp() 259 wpa_hexdump_ascii(MSG_DEBUG, "oper friendly name", pos, slen); in hs20_parse_rx_hs20_anqp_resp() 263 wpabuf_alloc_copy(pos, slen); in hs20_parse_rx_hs20_anqp_resp() 267 wpa_hexdump(MSG_DEBUG, "WAN Metrics", pos, slen); in hs20_parse_rx_hs20_anqp_resp() 268 if (slen < 13) { in hs20_parse_rx_hs20_anqp_resp() [all …]
|
| /freebsd/lib/libc/stdlib/ |
| H A D | realpath.c | 54 ssize_t slen; in realpath1() local 157 slen = readlink(resolved, symlink, sizeof(symlink)); in realpath1() 158 if (slen < 0) in realpath1() 160 if (slen == 0) { in realpath1() 164 if ((size_t)slen >= sizeof(symlink)) { in realpath1() 168 symlink[slen] = '\0'; in realpath1() 185 if (symlink[slen - 1] != '/') { in realpath1() 186 if ((size_t)slen + 1 >= sizeof(symlink)) { in realpath1() 190 symlink[slen] = '/'; in realpath1() 191 symlink[slen + 1] = 0; in realpath1()
|
| /freebsd/contrib/bearssl/src/x509/ |
| H A D | encode_rsa_rawder.c | 54 size_t u, slen; in br_encode_rsa_raw_der() local 73 slen = 0; in br_encode_rsa_raw_der() 78 slen += 1 + len_of_len(ilen) + ilen; in br_encode_rsa_raw_der() 82 return 1 + len_of_len(slen) + slen; in br_encode_rsa_raw_der() 89 lenlen = br_asn1_encode_length(buf, slen); in br_encode_rsa_raw_der() 94 return 1 + lenlen + slen; in br_encode_rsa_raw_der()
|
| /freebsd/contrib/blocklist/test/ |
| H A D | srvtest.c | 89 socklen_t slen; in process_udp() local 93 slen = (socklen_t)sizeof(ss); in process_udp() 96 &slen)) == -1) in process_udp() 100 blocklist_sa(1, afd, (void *)&ss, slen, buffer); in process_udp() 108 socklen_t slen; in cr() local 118 slen = sizeof(*s); in cr() 123 slen = sizeof(*s6); in cr() 127 ss.ss_len = (uint8_t)slen; in cr() 130 if (bind(sfd, (const void *)&ss, slen) == -1) in cr()
|
| H A D | cltest.c | 65 socklen_t *slen) in getaddr() argument 76 *slen = sizeof(*s6); in getaddr() 82 *slen = sizeof(*s); in getaddr() 86 ss->ss_len = (uint8_t)*slen; in getaddr() 102 socklen_t slen; in main() local 124 getaddr(addr, port, &ss, &slen); in main() 131 if (connect(sfd, (const void *)&ss, slen) == -1) in main()
|
| /freebsd/sys/contrib/openzfs/lib/libspl/ |
| H A D | strlcpy.c | 32 size_t slen = strlen(src); in strlcpy() local 36 return (slen); in strlcpy() 38 if (slen >= len) in strlcpy() 41 copied = slen; in strlcpy() 44 return (slen); in strlcpy()
|
| /freebsd/contrib/unbound/ipsecmod/ |
| H A D | ipsecmod.c | 197 domainname_has_safe_characters(char* s, size_t slen) { in domainname_has_safe_characters() argument 199 for(i = 0; i < slen; i++) { in domainname_has_safe_characters() 223 ipseckey_has_safe_characters(char* s, size_t slen) { in ipseckey_has_safe_characters() argument 226 gateway = (char*)calloc(slen, sizeof(char)); in ipseckey_has_safe_characters() 240 if(domainname_has_safe_characters(gateway, slen)) { in ipseckey_has_safe_characters() 260 size_t slen, tempdata_len, tempstring_len, i; in call_hook() local 318 slen = sizeof(a_s); in call_hook() 319 memset(s, 0, slen); in call_hook() 323 w += sldns_str_print(&s, &slen, " "); in call_hook() 327 rrset_data->rr_len[i] - 2, s, slen, qstate->qinfo.qtype); in call_hook() [all …]
|
| /freebsd/lib/libc/secure/ |
| H A D | strncat_chk.c | 42 size_t slen) in __strncat_chk() argument 49 if (len > slen) in __strncat_chk() 53 if (slen-- == 0) in __strncat_chk() 60 if (slen-- == 0) in __strncat_chk() 65 if (slen-- == 0) in __strncat_chk()
|
| /freebsd/crypto/openssh/ |
| H A D | sftp-realpath.c | 64 int serrno, slen, mem_allocated; in sftp_realpath() local 173 slen = readlink(resolved, symlink, sizeof(symlink) - 1); in sftp_realpath() 174 if (slen < 0) in sftp_realpath() 176 symlink[slen] = '\0'; in sftp_realpath() 194 if (symlink[slen - 1] != '/') { in sftp_realpath() 195 if (slen + 1 >= in sftp_realpath() 200 symlink[slen] = '/'; in sftp_realpath() 201 symlink[slen + 1] = 0; in sftp_realpath()
|