/freebsd/contrib/libarchive/libarchive/test/ |
H A D | test_tar_filenames.c | 34 test_filename(const char *prefix, int dlen, int flen) 50 if (dlen > 0) { in test_filename() 51 for (i = 0; i < dlen; i++) in test_filename() 74 failure("Pathname %d/%d", dlen, flen); in test_filename() 84 failure("Dirname %d/%d", dlen, flen); in test_filename() 97 failure("Dirname %d/%d", dlen, flen); in test_filename() 142 int dlen, flen; in DEFINE_TEST() 145 for (dlen = 45; dlen < 55; dlen in DEFINE_TEST() 35 test_filename(const char * prefix,int dlen,int flen) test_filename() argument 143 int dlen, flen; DEFINE_TEST() local [all...] |
H A D | test_ustar_filenames.c | 32 test_filename(const char *prefix, int dlen, int flen) 47 if (dlen > 0) { in test_filename() 48 for (; i < dlen; i++) in test_filename() 53 for (; i < dlen + flen + separator; i++) in test_filename() 72 failure("dlen=%d, flen=%d", dlen, flen); in test_filename() 86 failure("dlen=%d, flen=%d", dlen, flen); in test_filename() 103 failure("dlen=%d, flen=%d", dlen, fle in test_filename() 33 test_filename(const char * prefix,int dlen,int flen) test_filename() argument 161 int dlen, flen; DEFINE_TEST() local [all...] |
/freebsd/contrib/unbound/sldns/ |
H A D | wire2str.c | 316 int sldns_wire2str_pkt_buf(uint8_t* d, size_t dlen, char* s, size_t slen) in sldns_wire2str_pkt_buf() argument 319 return sldns_wire2str_pkt_scan(&d, &dlen, &s, &slen); in sldns_wire2str_pkt_buf() 322 int sldns_wire2str_rr_buf(uint8_t* d, size_t dlen, char* s, size_t slen) in sldns_wire2str_rr_buf() argument 325 return sldns_wire2str_rr_scan(&d, &dlen, &s, &slen, NULL, 0, NULL); in sldns_wire2str_rr_buf() 328 int sldns_wire2str_rrquestion_buf(uint8_t* d, size_t dlen, char* s, size_t slen) in sldns_wire2str_rrquestion_buf() argument 331 return sldns_wire2str_rrquestion_scan(&d, &dlen, &s, &slen, NULL, 0, NULL); in sldns_wire2str_rrquestion_buf() 342 int sldns_wire2str_rr_unknown_buf(uint8_t* d, size_t dlen, char* s, size_t slen) in sldns_wire2str_rr_unknown_buf() argument 345 return sldns_wire2str_rr_unknown_scan(&d, &dlen, &s, &slen, NULL, 0, NULL); in sldns_wire2str_rr_unknown_buf() 380 int sldns_wire2str_dname_buf(uint8_t* d, size_t dlen, char* s, size_t slen) in sldns_wire2str_dname_buf() argument 383 return sldns_wire2str_dname_scan(&d, &dlen, &s, &slen, NULL, 0, NULL); in sldns_wire2str_dname_buf() [all …]
|
/freebsd/sys/netinet/libalias/ |
H A D | alias_irc.c | 170 int hlen, tlen, dlen; in AliasHandleIrcOut() local 181 dlen = tlen - hlen; in AliasHandleIrcOut() 187 if (dlen < (int)sizeof(":A!a@n.n PRIVMSG A :aDCC 1 1a") - 1) in AliasHandleIrcOut() 197 for (i = 0; i < dlen; i++) { in AliasHandleIrcOut() 213 if (i >= dlen || iCopy >= PKTSIZE) in AliasHandleIrcOut() 218 if (i + 4 >= dlen) /* Too short for DCC */ in AliasHandleIrcOut() 243 if (++i >= dlen) { in AliasHandleIrcOut() 252 if (++i >= dlen || iCopy >= PKTSIZE) { in AliasHandleIrcOut() 258 if (i + 1 < dlen && iCopy < PKTSIZE) in AliasHandleIrcOut() 267 if (++i >= dlen) { in AliasHandleIrcOut() [all …]
|
H A D | alias_ftp.c | 223 int hlen, tlen, dlen, pflags; in AliasHandleFtpOut() local 232 dlen = tlen - hlen; in AliasHandleFtpOut() 243 if (dlen <= MAX_MESSAGE_SIZE && !(pflags & WAIT_CRLF)) { in AliasHandleFtpOut() 248 if (ParseFtpPortCommand(la, sptr, dlen)) in AliasHandleFtpOut() 250 else if (ParseFtpEprtCommand(la, sptr, dlen)) in AliasHandleFtpOut() 254 if (ParseFtp227Reply(la, sptr, dlen)) in AliasHandleFtpOut() 256 else if (ParseFtp229Reply(la, sptr, dlen)) { in AliasHandleFtpOut() 267 if (dlen) { /* only if there's data */ in AliasHandleFtpOut() 283 int hlen, tlen, dlen, pflags; in AliasHandleFtpIn() local 291 dlen = tlen - hlen; in AliasHandleFtpIn() [all …]
|
H A D | alias_smedia.c | 212 search_string(char *data, int dlen, const char *search_str) in search_string() argument 218 for (i = 0; i < dlen - search_str_len; i++) { in search_string() 219 for (j = i, k = 0; j < dlen - search_str_len; j++, k++) { in search_string() 236 int hlen, tlen, dlen; in alias_rtsp_out() local 252 dlen = tlen - hlen; in alias_rtsp_out() 255 pos = search_string(data, dlen, transport_str); in alias_rtsp_out() 260 port_dlen = dlen - pos; in alias_rtsp_out() 396 AddSeq(lnk, delta + new_dlen - dlen, pip->ip_hl, pip->ip_len, in alias_rtsp_out() 418 int dlen) in alias_pna_out() argument 428 while (work + 4 < data + dlen) { in alias_pna_out() [all …]
|
/freebsd/contrib/blocklist/port/ |
H A D | strlcat.c | 62 size_t dlen; in __weak_alias() local 67 dlen = d - dst; in __weak_alias() 68 n = siz - dlen; in __weak_alias() 71 return(dlen + strlen(s)); in __weak_alias() 81 return(dlen + (s - src)); /* count does not include NUL */ in __weak_alias() 87 size_t dlen = strnlen(dst, siz); in __weak_alias() 93 return dlen + strlcpy(dst + dlen, src, siz - dlen); in __weak_alias()
|
/freebsd/sys/dev/hyperv/utilities/ |
H A D | vmbus_heartbeat.c | 82 int dlen, error; in vmbus_heartbeat_cb() local 90 dlen = sc->ic_buflen; in vmbus_heartbeat_cb() 91 error = vmbus_chan_recv(chan, data, &dlen, &xactid); in vmbus_heartbeat_cb() 96 if (dlen < sizeof(*hdr)) { in vmbus_heartbeat_cb() 97 device_printf(sc->ic_dev, "invalid data len %d\n", dlen); in vmbus_heartbeat_cb() 107 error = vmbus_ic_negomsg(sc, data, &dlen, in vmbus_heartbeat_cb() 115 if (dlen < VMBUS_ICMSG_HEARTBEAT_SIZE_MIN) { in vmbus_heartbeat_cb() 117 dlen); in vmbus_heartbeat_cb() 131 vmbus_ic_sendresp(sc, chan, data, dlen, xactid); in vmbus_heartbeat_cb()
|
H A D | vmbus_shutdown.c | 84 int dlen, error, do_shutdown = 0; in vmbus_shutdown_cb() local 92 dlen = sc->ic_buflen; in vmbus_shutdown_cb() 93 error = vmbus_chan_recv(chan, data, &dlen, &xactid); in vmbus_shutdown_cb() 98 if (dlen < sizeof(*hdr)) { in vmbus_shutdown_cb() 99 device_printf(sc->ic_dev, "invalid data len %d\n", dlen); in vmbus_shutdown_cb() 109 error = vmbus_ic_negomsg(sc, data, &dlen, in vmbus_shutdown_cb() 116 if (dlen < VMBUS_ICMSG_SHUTDOWN_SIZE_MIN) { in vmbus_shutdown_cb() 118 dlen); in vmbus_shutdown_cb() 143 vmbus_ic_sendresp(sc, chan, data, dlen, xactid); in vmbus_shutdown_cb()
|
H A D | vmbus_timesync.c | 173 int dlen, error; in vmbus_timesync_cb() local 181 dlen = sc->ic_buflen; in vmbus_timesync_cb() 182 error = vmbus_chan_recv(chan, data, &dlen, &xactid); in vmbus_timesync_cb() 187 if (dlen < sizeof(*hdr)) { in vmbus_timesync_cb() 188 device_printf(sc->ic_dev, "invalid data len %d\n", dlen); in vmbus_timesync_cb() 198 error = vmbus_ic_negomsg(sc, data, &dlen, in vmbus_timesync_cb() 210 if (dlen < sizeof(*msg4)) { in vmbus_timesync_cb() 212 "len %d\n", dlen); in vmbus_timesync_cb() 221 if (dlen < sizeof(*msg)) { in vmbus_timesync_cb() 223 "len %d\n", dlen); in vmbus_timesync_cb() [all …]
|
/freebsd/sys/netpfil/ipfilter/netinet/ |
H A D | ip_raudio_pxy.c | 81 int off, dlen; in ipf_p_raudio_out() local 99 dlen = MSGDSIZE(m) - off; in ipf_p_raudio_out() 100 if (dlen <= 0) in ipf_p_raudio_out() 103 if (dlen > sizeof(membuf)) in ipf_p_raudio_out() 104 dlen = sizeof(membuf); in ipf_p_raudio_out() 107 COPYDATA(m, off, dlen, (char *)membuf); in ipf_p_raudio_out() 116 s = (u_char *)memstr("PNA", (char *)membuf, 3, dlen); in ipf_p_raudio_out() 129 if ((s + 1) - membuf < dlen) { in ipf_p_raudio_out() 141 while ((rap->rap_eos == 0) && ((s + 1) - membuf < dlen)) { in ipf_p_raudio_out() 183 int off, dlen, slen; in ipf_p_raudio_in() local [all …]
|
/freebsd/lib/libutil/ |
H A D | trimdomain.c | 55 static size_t dlen; in trimdomain() local 69 dlen = strlen(domain); in trimdomain() 78 if (strncasecmp(s + 1, domain, dlen) == 0) { in trimdomain() 79 if (s[dlen + 1] == '\0') { in trimdomain() 82 } else if (s[dlen + 1] == ':' && in trimdomain() 83 isDISP(s + dlen + 2) && in trimdomain() 84 (len = strlen(s + dlen + 1)) < (size_t)(end - s)) { in trimdomain() 86 memmove(s, s + dlen + 1, len + 1); in trimdomain()
|
/freebsd/crypto/openssl/crypto/ec/ |
H A D | ecdsa_sign.c | 20 ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dlen, EC_KEY *eckey) in ECDSA_do_sign() argument 22 return ECDSA_do_sign_ex(dgst, dlen, NULL, NULL, eckey); in ECDSA_do_sign() 25 ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, int dlen, in ECDSA_do_sign_ex() argument 30 return eckey->meth->sign_sig(dgst, dlen, kinv, rp, eckey); in ECDSA_do_sign_ex() 35 int ECDSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char in ECDSA_sign() argument 38 return ECDSA_sign_ex(type, dgst, dlen, sig, siglen, NULL, NULL, eckey); in ECDSA_sign() 41 int ECDSA_sign_ex(int type, const unsigned char *dgst, int dlen, in ECDSA_sign_ex() argument 46 return eckey->meth->sign(type, dgst, dlen, sig, siglen, kinv, r, eckey); in ECDSA_sign_ex()
|
/freebsd/usr.bin/usbhidctl/ |
H A D | usbhid.c | 304 int dlen, havedata, i, match, r, rid, use_rid; in dumpdata() local 327 dlen = hid_report_size(rd, kind < 3 ? kind : hid_input, rid); in dumpdata() 328 if (dlen <= 0) in dumpdata() 330 dbuf = malloc(dlen); in dumpdata() 331 memset(dbuf, 0, dlen); in dumpdata() 334 r = hid_get_report(f, kind, dbuf, dlen); in dumpdata() 341 r = read(f, dbuf, dlen); in dumpdata() 350 use_rid ? dbuf[0] : 0, dlen); in dumpdata() 352 for (i = 0; i < dlen; i++) in dumpdata() 381 int dlen, i, r, rid; in writedata() local [all …]
|
/freebsd/crypto/openssh/ |
H A D | digest-openssl.c | 159 ssh_digest_final(struct ssh_digest_ctx *ctx, u_char *d, size_t dlen) in ssh_digest_final() argument 162 u_int l = dlen; in ssh_digest_final() 164 if (digest == NULL || dlen > UINT_MAX) in ssh_digest_final() 166 if (dlen < digest->digest_len) /* No truncation allowed */ in ssh_digest_final() 185 ssh_digest_memory(int alg, const void *m, size_t mlen, u_char *d, size_t dlen) in ssh_digest_memory() argument 192 if (dlen > UINT_MAX) in ssh_digest_memory() 194 if (dlen < digest->digest_len) in ssh_digest_memory() 196 mdlen = dlen; in ssh_digest_memory() 203 ssh_digest_buffer(int alg, const struct sshbuf *b, u_char *d, size_t dlen) in ssh_digest_buffer() argument 205 return ssh_digest_memory(alg, sshbuf_ptr(b), sshbuf_len(b), d, dlen); in ssh_digest_buffer()
|
/freebsd/contrib/ntp/libntp/ |
H A D | a_md5encrypt.c | 208 size_t dlen; in MD5authencrypt() 210 dlen = make_mac(&digb, type, &keyb, &msgb); in MD5authencrypt() 211 if (0 == dlen) { in MD5authencrypt() 215 min(dlen, MAX_MDG_LEN)); 216 return (dlen + KEY_MAC_LEN); 240 size_t dlen = 0; in MD5authdecrypt() 242 dlen = make_mac(&digb, type, &keyb, &msgb); in MD5authdecrypt() 243 if (0 == dlen || size != dlen + KEY_MAC_LEN) { in MD5authdecrypt() 246 (u_int)size, (u_int)(dlen in MD5authdecrypt() 205 size_t dlen = 0; MD5authencrypt() local 236 size_t dlen = 0; MD5authdecrypt() local [all...] |
/freebsd/crypto/openssh/regress/misc/fuzz-harness/ |
H A D | sig_fuzz.cc | 38 static const size_t dlen = strlen(data); in LLVMFuzzerTestOneInput() local 41 sshkey_verify(rsa, sig, slen, (const u_char *)data, dlen, NULL, 0, &details); in LLVMFuzzerTestOneInput() 44 sshkey_verify(dsa, sig, slen, (const u_char *)data, dlen, NULL, 0, &details); in LLVMFuzzerTestOneInput() 47 sshkey_verify(ecdsa256, sig, slen, (const u_char *)data, dlen, NULL, 0, &details); in LLVMFuzzerTestOneInput() 50 sshkey_verify(ecdsa384, sig, slen, (const u_char *)data, dlen, NULL, 0, &details); in LLVMFuzzerTestOneInput() 53 sshkey_verify(ecdsa521, sig, slen, (const u_char *)data, dlen, NULL, 0, &details); in LLVMFuzzerTestOneInput() 57 sshkey_verify(ed25519, sig, slen, (const u_char *)data, dlen, NULL, 0, &details); in LLVMFuzzerTestOneInput()
|
/freebsd/contrib/bearssl/src/aead/ |
H A D | gcm.c | 111 size_t ptr, dlen; in br_gcm_aad_inject() local 139 dlen = len & ~(size_t)15; in br_gcm_aad_inject() 140 ctx->gh(ctx->y, ctx->h, data, dlen); in br_gcm_aad_inject() 141 memcpy(ctx->buf, (const unsigned char *)data + dlen, len - dlen); in br_gcm_aad_inject() 167 size_t ptr, dlen; in br_gcm_run() local 201 dlen = len & ~(size_t)15; in br_gcm_run() 203 ctx->gh(ctx->y, ctx->h, buf, dlen); in br_gcm_run() 205 ctx->jc = (*ctx->bctx)->run(ctx->bctx, ctx->j0_1, ctx->jc, buf, dlen); in br_gcm_run() 207 ctx->gh(ctx->y, ctx->h, buf, dlen); in br_gcm_run() 209 buf += dlen; in br_gcm_run() [all …]
|
/freebsd/contrib/libc-vis/ |
H A D | vis.c | 396 istrsenvisx(char **mbdstp, size_t *dlen, const char *mbsrc, size_t mblength, in istrsenvisx() argument 535 if (dlen && *dlen == 0) { in istrsenvisx() 571 if (dlen) { in istrsenvisx() 572 maxolen = *dlen; in istrsenvisx() 681 istrsenvisxl(char **mbdstp, size_t *dlen, const char *mbsrc, in istrsenvisxl() argument 684 return istrsenvisx(mbdstp, dlen, mbsrc, in istrsenvisxl() 714 snvis(char *mbdst, size_t dlen, int c, int flags, int nextc, const char *mbextra) in snvis() argument 722 ret = istrsenvisx(&mbdst, &dlen, cc, 1, flags, mbextra, NULL); in snvis() 735 strsnvis(char *mbdst, size_t dlen, const char *mbsrc, int flags, const char *mbextra) in strsnvis() argument 737 return istrsenvisxl(&mbdst, &dlen, mbsrc, flags, mbextra, NULL); in strsnvis() [all …]
|
/freebsd/contrib/bearssl/src/rsa/ |
H A D | rsa_i15_oaep_encrypt.c | 36 size_t dlen; in br_rsa_i15_oaep_encrypt() local 38 dlen = br_rsa_oaep_pad(rnd, dig, label, label_len, in br_rsa_i15_oaep_encrypt() 40 if (dlen == 0) { in br_rsa_i15_oaep_encrypt() 43 return dlen & -(size_t)br_rsa_i15_public(dst, dlen, pk); in br_rsa_i15_oaep_encrypt()
|
H A D | rsa_i32_oaep_encrypt.c | 36 size_t dlen; in br_rsa_i32_oaep_encrypt() local 38 dlen = br_rsa_oaep_pad(rnd, dig, label, label_len, in br_rsa_i32_oaep_encrypt() 40 if (dlen == 0) { in br_rsa_i32_oaep_encrypt() 43 return dlen & -(size_t)br_rsa_i32_public(dst, dlen, pk); in br_rsa_i32_oaep_encrypt()
|
H A D | rsa_i31_oaep_encrypt.c | 36 size_t dlen; in br_rsa_i31_oaep_encrypt() local 38 dlen = br_rsa_oaep_pad(rnd, dig, label, label_len, in br_rsa_i31_oaep_encrypt() 40 if (dlen == 0) { in br_rsa_i31_oaep_encrypt() 43 return dlen & -(size_t)br_rsa_i31_public(dst, dlen, pk); in br_rsa_i31_oaep_encrypt()
|
/freebsd/contrib/mandoc/ |
H A D | compat_strlcat.c | 37 size_t dlen; in strlcat() local 42 dlen = dst - odst; in strlcat() 43 n = dsize - dlen; in strlcat() 46 return(dlen + strlen(src)); in strlcat() 56 return(dlen + (src - osrc)); /* count does not include NUL */ in strlcat()
|
/freebsd/sys/libkern/ |
H A D | strlcat.c | 48 size_t dlen; in strlcat() local 53 dlen = d - dst; in strlcat() 54 n = siz - dlen; in strlcat() 57 return(dlen + strlen(s)); in strlcat() 67 return(dlen + (s - src)); /* count does not include NUL */ in strlcat()
|
/freebsd/contrib/tcpdump/missing/ |
H A D | strlcat.c | 51 size_t dlen; in strlcat() local 56 dlen = d - dst; in strlcat() 57 n = siz - dlen; in strlcat() 60 return(dlen + strlen(s)); in strlcat() 70 return(dlen + (s - src)); /* count does not include NUL */ in strlcat()
|