| /openbsd/src/usr.bin/vi/common/ |
| D | seq.c | 37 CHAR_T *output, size_t olen, seq_t stype, int flags) in seq_set() argument 54 if (output == NULL || olen == 0) { in seq_set() 56 olen = 0; in seq_set() 57 } else if ((p = v_strdup(sp, output, olen)) == NULL) { in seq_set() 62 qp->olen = olen; in seq_set() 93 olen = 0; in seq_set() 94 } else if ((qp->output = v_strdup(sp, output, olen)) == NULL) { in seq_set() 103 qp->olen = olen; in seq_set() 269 int cnt, len, olen; in seq_dump() local 278 olen = qp->ilen, len = 0; olen > 0; --olen, ++p) in seq_dump() [all …]
|
| D | key.c | 690 qp->olen - qp->ilen, CH_MAPPED)) in v_event_get() 698 if (v_event_push(sp, NULL, qp->output, qp->olen, CH_MAPPED)) in v_event_get() 704 if (v_event_push(sp, NULL, qp->output, qp->olen, CH_MAPPED | CH_NOMAP)) in v_event_get() 805 size_t new_nelem, olen; in v_event_grow() local 809 olen = gp->i_nelem * sizeof(gp->i_event[0]); in v_event_grow() 810 BINC_RET(sp, gp->i_event, olen, new_nelem * sizeof(gp->i_event[0])); in v_event_grow() 811 gp->i_nelem = olen / sizeof(gp->i_event[0]); in v_event_grow()
|
| /openbsd/src/lib/libfido2/src/ |
| D | compress.c | 16 u_long ilen, olen; in rfc1950_inflate() local 22 origsiz > ULONG_MAX || (olen = (u_long)origsiz) > BOUND) { in rfc1950_inflate() 28 if ((out->ptr = calloc(1, olen)) == NULL) in rfc1950_inflate() 30 out->len = olen; in rfc1950_inflate() 32 if ((z = uncompress(out->ptr, &olen, in->ptr, ilen)) != Z_OK || in rfc1950_inflate() 33 olen > SIZE_MAX || olen != out->len) { in rfc1950_inflate() 35 __func__, z, olen, out->len); in rfc1950_inflate() 48 u_int ilen, olen; in rfc1951_inflate() local 55 origsiz > UINT_MAX || (olen = (u_int)origsiz) > BOUND) { in rfc1951_inflate() 65 if ((out->ptr = calloc(1, olen)) == NULL) { in rfc1951_inflate() [all …]
|
| D | hid_openbsd.c | 36 fido_hid_manifest(fido_dev_info_t *devlist, size_t ilen, size_t *olen) in fido_hid_manifest() argument 47 if (devlist == NULL || olen == NULL) in fido_hid_manifest() 50 for (i = *olen = 0; i < MAX_UHID && *olen < ilen; i++) { in fido_hid_manifest() 65 di = &devlist[*olen]; in fido_hid_manifest() 84 (*olen)++; in fido_hid_manifest()
|
| D | dev.c | 243 run_manifest(fido_dev_info_t *devlist, size_t ilen, size_t *olen, in run_manifest() argument 249 if (*olen >= ilen) { in run_manifest() 253 if ((r = manifest(devlist + *olen, ilen - *olen, &ndevs)) != FIDO_OK) in run_manifest() 257 *olen += ndevs; in run_manifest() 261 fido_dev_info_manifest(fido_dev_info_t *devlist, size_t ilen, size_t *olen) in fido_dev_info_manifest() argument 263 *olen = 0; in fido_dev_info_manifest() 265 run_manifest(devlist, ilen, olen, "hid", fido_hid_manifest); in fido_dev_info_manifest() 267 run_manifest(devlist, ilen, olen, "nfc", fido_nfc_manifest); in fido_dev_info_manifest() 270 run_manifest(devlist, ilen, olen, "pcsc", fido_pcsc_manifest); in fido_dev_info_manifest() 273 run_manifest(devlist, ilen, olen, "winhello", fido_winhello_manifest); in fido_dev_info_manifest()
|
| /openbsd/src/sys/dev/usb/ |
| D | utwitch.c | 264 int olen; in utwitch_set_mode() local 266 olen = MIN(sc->sc_olen, sizeof(req)); in utwitch_set_mode() 272 sc->sc_hdev.sc_report_id, req, olen) != olen) { in utwitch_set_mode() 285 int olen; in utwitch_read_value_request() local 287 olen = MIN(sc->sc_olen, sizeof(req)); in utwitch_read_value_request() 294 sc->sc_hdev.sc_report_id, req, olen) != olen) in utwitch_read_value_request() 306 int olen; in utwitch_write_value_request() local 308 olen = MIN(sc->sc_olen, sizeof(req)); in utwitch_write_value_request() 319 sc->sc_hdev.sc_report_id, req, olen) != olen) in utwitch_write_value_request()
|
| D | uthum.c | 285 int i, actlen, olen; in uthum_issue_cmd() local 287 olen = MIN(sc->sc_olen, sizeof(cmdbuf)); in uthum_issue_cmd() 292 sc->sc_hdev.sc_report_id, cmdbuf, olen); in uthum_issue_cmd() 293 if (actlen != olen) in uthum_issue_cmd() 299 sc->sc_hdev.sc_report_id, cmdbuf, olen); in uthum_issue_cmd() 300 if (actlen != olen) in uthum_issue_cmd() 306 UHID_OUTPUT_REPORT, sc->sc_hdev.sc_report_id, cmdbuf, olen); in uthum_issue_cmd() 307 if (actlen != olen) in uthum_issue_cmd() 324 int olen, flen; in uthum_read_data() local 333 olen = MIN(sc->sc_olen, sizeof(cmdbuf)); in uthum_read_data() [all …]
|
| D | utrh.c | 203 int temp, rh, flen, olen; in utrh_refresh() local 218 olen = MIN(sc->sc_olen, sizeof(cmdbuf)); in utrh_refresh() 220 sc->sc_hdev.sc_report_id, cmdbuf, olen) != olen) in utrh_refresh()
|
| /openbsd/src/games/pig/ |
| D | pig.c | 82 int olen, allupper, firstupper; in pigout() local 105 for (start = 0, olen = len; in pigout() 106 !strchr("aeiouyAEIOUY", buf[start]) && start < olen;) { in pigout() 108 if ((ch == 'q' || ch == 'Q') && start < olen && in pigout() 114 (void)printf("%.*s%s", olen, buf + start, allupper ? "AY" : "ay"); in pigout()
|
| /openbsd/src/sys/net/ |
| D | ppp-deflate.c | 228 int proto, olen, wspace, r, flush; in z_compress() local 283 olen = 0; in z_compress() 303 olen += wspace; in z_compress() 308 if (maxolen - olen > MLEN) in z_compress() 321 olen += (m->m_len = wspace - state->strm.avail_out); in z_compress() 328 if (m != NULL && olen < orig_len in z_compress() 329 && !(olen == PPP_HDRLEN + 3 && *wptr == 0)) { in z_compress() 330 state->stats.comp_bytes += olen; in z_compress() 337 olen = orig_len; in z_compress() 342 return olen; in z_compress() [all …]
|
| D | pf_norm.c | 1188 int olen; in pf_normalize_tcp_init() local 1221 olen = (th->th_off << 2) - sizeof(*th); in pf_normalize_tcp_init() 1222 if (olen < TCPOLEN_TIMESTAMP || !pf_pull_hdr(pd->m, in pf_normalize_tcp_init() 1223 pd->off + sizeof(*th), opts, olen, NULL, pd->af)) in pf_normalize_tcp_init() 1227 while ((opt = pf_find_tcpopt(opt, opts, olen, in pf_normalize_tcp_init() 1268 int olen; in pf_normalize_tcp_stateful() local 1301 olen = (th->th_off << 2) - sizeof(*th); in pf_normalize_tcp_stateful() 1303 if (olen >= TCPOLEN_TIMESTAMP && in pf_normalize_tcp_stateful() 1306 pf_pull_hdr(pd->m, pd->off + sizeof(*th), opts, olen, NULL, in pf_normalize_tcp_stateful() 1313 while ((opt = pf_find_tcpopt(opt, opts, olen, in pf_normalize_tcp_stateful() [all …]
|
| D | bsd-comp.c | 467 int olen; in bsd_compress() local 471 ++olen; \ in bsd_compress() 480 if (maxolen - olen > MLEN) \ in bsd_compress() 544 olen = 0; in bsd_compress() 613 db->bytes_out += olen; in bsd_compress() 642 if (olen + PPP_HDRLEN + BSD_OVHD > maxolen) { in bsd_compress() 650 db->comp_bytes += olen + BSD_OVHD; in bsd_compress() 653 return olen + PPP_HDRLEN + BSD_OVHD; in bsd_compress()
|
| /openbsd/src/usr.sbin/smtpd/ |
| D | crypto.c | 218 int olen; in crypto_encrypt_buffer() local 248 if (!EVP_EncryptUpdate(ctx, out + len, &olen, in, inlen)) in crypto_encrypt_buffer() 250 len += olen; in crypto_encrypt_buffer() 253 if (!EVP_EncryptFinal_ex(ctx, out + len, &olen)) in crypto_encrypt_buffer() 255 len += olen; in crypto_encrypt_buffer() 273 int olen; in crypto_decrypt_buffer() local 307 if (!EVP_DecryptUpdate(ctx, out, &olen, in, inlen)) in crypto_decrypt_buffer() 309 len += olen; in crypto_decrypt_buffer() 312 if (!EVP_DecryptFinal_ex(ctx, out + len, &olen)) in crypto_decrypt_buffer() 314 ret = len + olen; in crypto_decrypt_buffer()
|
| /openbsd/src/usr.sbin/ypserv/revnetgroup/ |
| D | parse_netgroup.c | 275 int len, olen; in read_for_group() local 304 olen = 0; in read_for_group() 317 linep = malloc(olen + len + 1); in read_for_group() 318 if (olen > 0) { in read_for_group() 319 bcopy(olinep, linep, olen); in read_for_group() 322 bcopy(pos, linep + olen, len); in read_for_group() 323 olen += len; in read_for_group() 324 *(linep + olen) = '\0'; in read_for_group()
|
| /openbsd/src/usr.sbin/pppd/ |
| D | cbcp.c | 186 int code, opt, id, len, olen, delay; in cbcp_printpkt() local 212 GETCHAR(olen, p); in cbcp_printpkt() 214 if (olen < 2 || olen > len) { in cbcp_printpkt() 219 len -= olen; in cbcp_printpkt() 226 if (olen > 2) { in cbcp_printpkt() 231 if (olen > 3) { in cbcp_printpkt() 236 memcpy(str, p, olen - 4); in cbcp_printpkt() 237 str[olen - 4] = 0; in cbcp_printpkt()
|
| D | lcp.c | 1530 int code, id, len, olen; in lcp_printpkt() local 1558 GETCHAR(olen, p); in lcp_printpkt() 1560 if (olen < 2 || olen > len) { in lcp_printpkt() 1564 len -= olen; in lcp_printpkt() 1565 optend = p + olen; in lcp_printpkt() 1568 if (olen == CILEN_SHORT) { in lcp_printpkt() 1575 if (olen == CILEN_LONG) { in lcp_printpkt() 1582 if (olen >= CILEN_SHORT) { in lcp_printpkt() 1599 if (olen >= CILEN_SHORT) { in lcp_printpkt() 1613 if (olen >= CILEN_CHAR) { in lcp_printpkt() [all …]
|
| /openbsd/src/lib/libcrypto/cms/ |
| D | cms_pwri.c | 289 size_t olen; in kek_wrap_key() local 296 olen = (inlen + 4 + blocklen - 1) / blocklen; in kek_wrap_key() 297 olen *= blocklen; in kek_wrap_key() 298 if (olen < 2 * blocklen) { in kek_wrap_key() 314 if (olen > inlen + 4) in kek_wrap_key() 315 arc4random_buf(out + 4 + inlen, olen - 4 - inlen); in kek_wrap_key() 317 if (!EVP_EncryptUpdate(ctx, out, &dummy, out, olen) || in kek_wrap_key() 318 !EVP_EncryptUpdate(ctx, out, &dummy, out, olen)) in kek_wrap_key() 322 *outlen = olen; in kek_wrap_key()
|
| /openbsd/src/sys/dev/pci/drm/i915/gt/ |
| D | shmem_utils.c | 224 size_t olen = round_page(len); in __uao_rw() local 227 if (uvm_obj_wire(uao, pgoff, olen, &plist)) in __uao_rw() 248 uvm_obj_unwire(uao, pgoff, olen); in __uao_rw() 259 size_t olen = round_page(len); in uao_read_to_iosys_map() local 262 if (uvm_obj_wire(uao, pgoff, olen, &plist)) in uao_read_to_iosys_map() 280 uvm_obj_unwire(uao, pgoff, olen); in uao_read_to_iosys_map()
|
| /openbsd/src/usr.sbin/bgpd/ |
| D | flowspec.c | 332 struct bgpd_addr *addr, uint8_t *plen, uint8_t *olen) in flowspec_get_addr() argument 339 if (olen != NULL) in flowspec_get_addr() 340 *olen = 0; in flowspec_get_addr() 361 if (olen == NULL) in flowspec_get_addr() 371 if (olen != NULL) in flowspec_get_addr() 372 *olen = comp[1]; in flowspec_get_addr()
|
| D | rde_attr.c | 403 uint16_t seg_size, olen, nlen; in aspath_deflate() local 409 olen = *len; in aspath_deflate() 410 for (; olen > 0; olen -= seg_size, seg += seg_size) { in aspath_deflate() 415 if (seg_size > olen) in aspath_deflate() 427 olen = *len; in aspath_deflate() 428 for (nseg = ndata; seg < data + olen; seg += seg_size) { in aspath_deflate()
|
| /openbsd/src/usr.sbin/traceroute/ |
| D | worker.c | 121 u_int16_t off, olen; in print_exthdr() local 180 olen = ntohs(objhdr.ieo_length); in print_exthdr() 183 if (olen < sizeof(objhdr) || olen > cc) in print_exthdr() 186 cc -= olen; in print_exthdr() 190 olen -= sizeof(objhdr); in print_exthdr() 198 while (olen >= sizeof(u_int32_t)) { in print_exthdr() 202 olen -= sizeof(u_int32_t); in print_exthdr() 242 if (olen > 0) { in print_exthdr() 263 buf += olen; in print_exthdr() 269 buf += olen; in print_exthdr()
|
| /openbsd/src/sys/kern/ |
| D | uipc_mbuf2.c | 91 int hlen, tlen, olen; in m_pulldown() local 149 olen = 0; in m_pulldown() 151 olen += o->m_len; in m_pulldown() 152 if (hlen + olen < len) { in m_pulldown()
|
| /openbsd/src/usr.bin/vi/vi/ |
| D | v_txt.c | 1568 if (v_event_push(sp, NULL, qp->output, qp->olen, CH_ABBREVIATED)) in txt_abbrev() 1581 if (qp->olen >= len) in txt_abbrev() 1585 memmove(tp->lb + tp->cno + qp->olen, in txt_abbrev() 1587 tp->owrite += qp->olen; in txt_abbrev() 1588 tp->len -= len - qp->olen; in txt_abbrev() 2232 size_t chlen, nlen, olen; in txt_emark() local 2243 (void)vs_columns(sp, tp->lb, tp->lno, &cno, &olen); in txt_emark() 2245 olen = KEY_LEN(sp, tp->lb[cno]); in txt_emark() 2252 if (olen > nlen) { in txt_emark() 2253 BINC_RET(sp, tp->lb, tp->lb_len, tp->len + olen); in txt_emark() [all …]
|
| /openbsd/src/sbin/iked/ |
| D | crypto.c | 607 int olen = 0; in cipher_aad() local 609 if (EVP_CipherUpdate(encr->encr_ctx, NULL, &olen, in, inlen) != 1) { in cipher_aad() 614 *outlen = (size_t)olen; in cipher_aad() 621 int olen; in cipher_update() local 623 olen = 0; in cipher_update() 624 if (EVP_CipherUpdate(encr->encr_ctx, out, &olen, in, inlen) != 1) { in cipher_update() 629 *outlen = (size_t)olen; in cipher_update() 636 int olen; in cipher_final() local 642 if (EVP_CipherFinal_ex(encr->encr_ctx, NULL, &olen) != 1) { in cipher_final()
|
| /openbsd/src/sys/netinet/ |
| D | ip_input.c | 1426 unsigned olen; in save_rte() local 1428 olen = option[IPOPT_OLEN]; in save_rte() 1429 if (olen > sizeof(isr->isr_hdr) + sizeof(isr->isr_routes)) in save_rte() 1439 memcpy(isr->isr_hdr, option, olen); in save_rte() 1440 isr->isr_nhops = (olen - IPOPT_OFFSET - 1) / sizeof(struct in_addr); in save_rte() 1519 int olen; in ip_stripoptions() local 1521 olen = (ip->ip_hl<<2) - sizeof (struct ip); in ip_stripoptions() 1523 i = m->m_len - (sizeof (struct ip) + olen); in ip_stripoptions() 1524 memmove(opts, opts + olen, i); in ip_stripoptions() 1525 m->m_len -= olen; in ip_stripoptions() [all …]
|