/freebsd/crypto/openssl/test/ |
H A D | rand_test.c | 22 unsigned char outbuf[3]; in test_rand() local 30 || !TEST_int_gt(RAND_priv_bytes(outbuf, sizeof(outbuf)), 0) in test_rand() 31 || !TEST_mem_eq(outbuf, sizeof(outbuf), entropy1, sizeof(outbuf)) in test_rand() 32 || !TEST_int_le(RAND_priv_bytes(outbuf, sizeof(outbuf) + 1), 0) in test_rand() 33 || !TEST_int_gt(RAND_priv_bytes(outbuf, sizeof(outbuf)), 0) in test_rand() 34 || !TEST_mem_eq(outbuf, sizeof(outbuf), in test_rand() 35 entropy1 + sizeof(outbuf), sizeof(outbuf))) in test_rand() 41 || !TEST_int_gt(RAND_priv_bytes(outbuf, sizeof(outbuf)), 0) in test_rand() 42 || !TEST_mem_eq(outbuf, sizeof(outbuf), entropy2, sizeof(outbuf))) in test_rand()
|
/freebsd/tools/test/iconv/posix/ |
H A D | posix.c | 114 uint32_t outbuf[4]; in conv_ret() local 121 outptr = (char *)outbuf; in conv_ret() 136 uint32_t outbuf[2]; in conv_2big() local 143 outptr = (char *)outbuf; in conv_2big() 154 printf("outptr - outbuf = %d\n", (uint8_t *)outptr - (uint8_t *)outbuf); in conv_2big() 160 (outbytesleft == 0) && ((uint8_t *)outptr - (uint8_t *)outbuf == 8) && in conv_2big() 174 uint32_t outbuf[4]; in conv_einval() local 182 outptr = (char *)outbuf; in conv_einval() 193 printf("outptr - outbuf = %d\n", (uint8_t *)outptr - (uint8_t *)outbuf); in conv_einval() 199 (outbytesleft == 8) && ((uint8_t *)outptr - (uint8_t *)outbuf == 8) && in conv_einval() [all …]
|
/freebsd/crypto/openssl/demos/cipher/ |
H A D | aeskeywrap.c | 62 unsigned char outbuf[1024]; in aes_wrap_encrypt() local 86 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, wrap_pt, sizeof(wrap_pt))) in aes_wrap_encrypt() 90 if (!EVP_EncryptFinal_ex(ctx, outbuf + outlen, &tmplen)) in aes_wrap_encrypt() 96 BIO_dump_fp(stdout, outbuf, outlen); in aes_wrap_encrypt() 98 if (sizeof(wrap_ct) == outlen && !CRYPTO_memcmp(outbuf, wrap_ct, outlen)) in aes_wrap_encrypt() 120 unsigned char outbuf[1024]; in aes_wrap_decrypt() local 143 if (!EVP_DecryptUpdate(ctx, outbuf, &outlen, wrap_ct, sizeof(wrap_ct))) in aes_wrap_decrypt() 147 if (!EVP_DecryptFinal_ex(ctx, outbuf + outlen, &tmplen)) in aes_wrap_decrypt() 153 BIO_dump_fp(stdout, outbuf, outlen); in aes_wrap_decrypt() 155 if (sizeof(wrap_pt) == outlen && !CRYPTO_memcmp(outbuf, wrap_pt, outlen)) in aes_wrap_decrypt()
|
H A D | ariacbc.c | 62 unsigned char outbuf[1024]; in aria_cbc_encrypt() local 85 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, cbc_pt, sizeof(cbc_pt))) in aria_cbc_encrypt() 89 if (!EVP_EncryptFinal_ex(ctx, outbuf + outlen, &tmplen)) in aria_cbc_encrypt() 95 BIO_dump_fp(stdout, outbuf, outlen); in aria_cbc_encrypt() 97 if (sizeof(cbc_ct) == outlen && !CRYPTO_memcmp(outbuf, cbc_ct, outlen)) in aria_cbc_encrypt() 120 unsigned char outbuf[1024]; in aria_cbc_decrypt() local 141 if (!EVP_DecryptUpdate(ctx, outbuf, &outlen, cbc_ct, sizeof(cbc_ct))) in aria_cbc_decrypt() 145 if (!EVP_DecryptFinal_ex(ctx, outbuf + outlen, &tmplen)) in aria_cbc_decrypt() 151 BIO_dump_fp(stdout, outbuf, outlen); in aria_cbc_decrypt() 153 if (sizeof(cbc_pt) == outlen && !CRYPTO_memcmp(outbuf, cbc_pt, outlen)) in aria_cbc_decrypt()
|
H A D | aesgcm.c | 77 unsigned char outbuf[1024]; in aes_gcm_encrypt() local 114 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, gcm_pt, sizeof(gcm_pt))) in aes_gcm_encrypt() 119 BIO_dump_fp(stdout, outbuf, outlen); in aes_gcm_encrypt() 122 if (!EVP_EncryptFinal_ex(ctx, outbuf, &tmplen)) in aes_gcm_encrypt() 154 unsigned char outbuf[1024]; in aes_gcm_decrypt() local 186 if (!EVP_DecryptUpdate(ctx, outbuf, &outlen, gcm_ct, sizeof(gcm_ct))) in aes_gcm_decrypt() 191 BIO_dump_fp(stdout, outbuf, outlen); in aes_gcm_decrypt() 201 rv = EVP_DecryptFinal_ex(ctx, outbuf, &outlen); in aes_gcm_decrypt()
|
H A D | aesccm.c | 79 unsigned char outbuf[1024]; in aes_ccm_encrypt() local 124 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, ccm_pt, sizeof(ccm_pt))) in aes_ccm_encrypt() 129 BIO_dump_fp(stdout, outbuf, outlen); in aes_ccm_encrypt() 164 unsigned char outbuf[1024]; in aes_ccm_decrypt() local 208 rv = EVP_DecryptUpdate(ctx, outbuf, &outlen, ccm_ct, sizeof(ccm_ct)); in aes_ccm_decrypt() 213 BIO_dump_fp(stdout, outbuf, outlen); in aes_ccm_decrypt()
|
/freebsd/usr.bin/rctl/ |
H A D | rctl.c | 414 char *outbuf = NULL; in show_limits() local 419 outbuf = realloc(outbuf, outbuflen); in show_limits() 420 if (outbuf == NULL) in show_limits() 423 outbuf, outbuflen); in show_limits() 431 free(outbuf); in show_limits() 436 print_rules(outbuf, hflag, nflag); in show_limits() 437 free(outbuf); in show_limits() 497 char *copy, *outbuf = NULL, *tmp; in show_usage() local 502 outbuf = realloc(outbuf, outbuflen); in show_usage() 503 if (outbuf == NULL) in show_usage() [all …]
|
/freebsd/contrib/ncurses/progs/ |
H A D | dump_entry.c | 73 static DYNBUF outbuf; variable 157 free_DYN(&outbuf); in _nc_leaks_dump_entry() 417 while (outbuf.used > 0 && outbuf.text[outbuf.used - 1] == ' ') in trim_trailing() 418 outbuf.text[--outbuf.used] = '\0'; in trim_trailing() 426 strcpy_DYN(&outbuf, trailer); in force_wrap() 618 if (TcOutput() && outbuf.used && !wrap_1ST(mode)) { in wrap_concat() 625 strcpy_DYN(&outbuf, align); in wrap_concat() 632 strncpy_DYN(&outbuf, fill + step, (size_t) size); in wrap_concat() 644 strcpy_DYN(&outbuf, align); in wrap_concat() 645 strcpy_DYN(&outbuf, fill + step); in wrap_concat() [all …]
|
/freebsd/tools/test/iconv/gnu/ |
H A D | gnu.c | 247 char *outbuf; in ctl_uc_hook() local 253 outbuf = malloc(40); in ctl_uc_hook() 254 outptr = &outbuf; in ctl_uc_hook() 277 char *outbuf; in ctl_wc_hook() local 283 outbuf = malloc(40); in ctl_wc_hook() 284 outptr = &outbuf; in ctl_wc_hook() 350 uint8_t outbuf[4] = { 0x00, 0x00, 0x00, 0x00 }; in ctl_mb_to_uc_fb() local 368 outptr = (char *)outbuf; in ctl_mb_to_uc_fb() 376 printf("mb_uc fallback: %c\n", outbuf[0]); in ctl_mb_to_uc_fb() 379 if (mb_uc_fb && (outbuf[0] == 0x3F)) in ctl_mb_to_uc_fb() [all …]
|
/freebsd/crypto/heimdal/lib/krb5/ |
H A D | rd_safe.c | 87 krb5_data *outbuf, in krb5_rd_safe() argument 94 krb5_data_zero(outbuf); in krb5_rd_safe() 191 outbuf->length = safe.safe_body.user_data.length; in krb5_rd_safe() 192 outbuf->data = malloc(outbuf->length); in krb5_rd_safe() 193 if (outbuf->data == NULL && outbuf->length != 0) { in krb5_rd_safe() 196 krb5_data_zero(outbuf); in krb5_rd_safe() 199 memcpy (outbuf->data, safe.safe_body.user_data.data, outbuf->length); in krb5_rd_safe()
|
/freebsd/sys/fs/cd9660/ |
H A D | cd9660_rrip.c | 111 char *outbuf, *inbuf; in cd9660_rrip_slink() local 117 outbuf = ana->outbuf; in cd9660_rrip_slink() 130 *outbuf++ = '/'; in cd9660_rrip_slink() 157 outbuf -= len; in cd9660_rrip_slink() 189 ana->outbuf -= *ana->outlen; in cd9660_rrip_slink() 194 memcpy(outbuf, inbuf, wlen); in cd9660_rrip_slink() 195 outbuf += wlen; in cd9660_rrip_slink() 198 ana->outbuf = outbuf; in cd9660_rrip_slink() 260 ana->outbuf -= *ana->outlen - wlen; in cd9660_rrip_altname() 265 memcpy(ana->outbuf, inbuf, wlen); in cd9660_rrip_altname() [all …]
|
/freebsd/contrib/wpa/src/eap_server/ |
H A D | eap_server_pwd.c | 39 struct wpabuf *outbuf; member 135 data->inbuf = data->outbuf = NULL; in eap_pwd_init() 163 wpabuf_free(data->outbuf); in eap_pwd_reset() 178 data->outbuf = wpabuf_alloc(sizeof(struct eap_pwd_id) + in eap_pwd_build_id_req() 180 if (data->outbuf == NULL) { in eap_pwd_build_id_req() 186 wpabuf_free(data->outbuf); in eap_pwd_build_id_req() 187 data->outbuf = NULL; in eap_pwd_build_id_req() 226 wpabuf_put_be16(data->outbuf, data->group_num); in eap_pwd_build_id_req() 227 wpabuf_put_u8(data->outbuf, EAP_PWD_DEFAULT_RAND_FUNC); in eap_pwd_build_id_req() 228 wpabuf_put_u8(data->outbuf, EAP_PWD_DEFAULT_PRF); in eap_pwd_build_id_req() [all …]
|
/freebsd/share/examples/ipfilter/samples/ |
H A D | proxy.c | 232 char netbuf[1024], outbuf[1024]; local 248 orptr = outbuf; 249 owptr = outbuf; 250 osz = sizeof(outbuf); 258 if (orptr - outbuf < sizeof(outbuf)) 263 if (osz < sizeof(outbuf)) 278 i = read(net, orptr, sizeof(outbuf) - (orptr - outbuf)); 291 if (osz == sizeof(outbuf) || owptr == orptr) { 292 orptr = outbuf; 293 owptr = outbuf;
|
/freebsd/usr.bin/gzip/ |
H A D | unbzip2.c | 42 static char *inbuf, *outbuf; in unbzip2() local 46 if (outbuf == NULL) in unbzip2() 47 outbuf = malloc(BUFLEN); in unbzip2() 48 if (inbuf == NULL || outbuf == NULL) in unbzip2() 84 bzs.next_out = outbuf; in unbzip2() 106 n = write(out, outbuf, BUFLEN - bzs.avail_out); in unbzip2()
|
/freebsd/contrib/wpa/src/eap_peer/ |
H A D | eap_pwd.c | 41 struct wpabuf *outbuf; member 162 data->inbuf = data->outbuf = NULL; in eap_pwd_init() 197 wpabuf_free(data->outbuf); in eap_pwd_deinit() 335 data->outbuf = wpabuf_alloc(sizeof(struct eap_pwd_id) + in eap_pwd_perform_id_exchange() 337 if (data->outbuf == NULL) { in eap_pwd_perform_id_exchange() 341 wpabuf_put_be16(data->outbuf, data->group_num); in eap_pwd_perform_id_exchange() 342 wpabuf_put_u8(data->outbuf, EAP_PWD_DEFAULT_RAND_FUNC); in eap_pwd_perform_id_exchange() 343 wpabuf_put_u8(data->outbuf, EAP_PWD_DEFAULT_PRF); in eap_pwd_perform_id_exchange() 344 wpabuf_put_data(data->outbuf, id->token, sizeof(id->token)); in eap_pwd_perform_id_exchange() 345 wpabuf_put_u8(data->outbuf, id->prep); in eap_pwd_perform_id_exchange() [all …]
|
/freebsd/sys/fs/smbfs/ |
H A D | smbfs_subr.c | 159 char outbuf[SMB_MAXFNAMELEN]; in smbfs_fname_tolocal() local 160 char *obuf = outbuf; in smbfs_fname_tolocal() 163 olen = sizeof(outbuf); in smbfs_fname_tolocal() 164 bzero(outbuf, sizeof(outbuf)); in smbfs_fname_tolocal() 186 *nmlen = sizeof(outbuf) - olen; in smbfs_fname_tolocal() 187 memcpy(name, outbuf, *nmlen); in smbfs_fname_tolocal()
|
/freebsd/sys/sys/ |
H A D | iconv.h | 158 size_t *inbytesleft, char **outbuf, size_t *outbytesleft); 160 size_t *inbytesleft, char **outbuf, size_t *outbytesleft, int casetype); 162 size_t *inbytesleft, char **outbuf, size_t *outbytesleft); 164 size_t *inbytesleft, char **outbuf, size_t *outbytesleft, int casetype); 180 char **outbuf, size_t *outbytesleft); 182 char **outbuf, size_t *outbytesleft, int casetype); 184 char **outbuf, size_t *outbytesleft); 186 char **outbuf, size_t *outbytesleft, int casetype);
|
/freebsd/contrib/ofed/libibnetdisc/ |
H A D | ibnetdisc_cache.c | 215 static size_t _unmarshall_buf(const void *inbuf, void *outbuf, unsigned int len) in _unmarshall_buf() argument 217 memcpy(outbuf, inbuf, len); in _unmarshall_buf() 721 static size_t _marshall8(uint8_t * outbuf, uint8_t num) in _marshall8() argument 723 outbuf[0] = num; in _marshall8() 728 static size_t _marshall16(uint8_t * outbuf, uint16_t num) in _marshall16() argument 730 outbuf[0] = num & 0x00FF; in _marshall16() 731 outbuf[1] = (num & 0xFF00) >> 8; in _marshall16() 736 static size_t _marshall32(uint8_t * outbuf, uint32_t num) in _marshall32() argument 738 outbuf[0] = num & 0x000000FF; in _marshall32() 739 outbuf[1] = (num & 0x0000FF00) >> 8; in _marshall32() [all …]
|
/freebsd/sys/netgraph/ |
H A D | ng_deflate.c | 65 u_char outbuf[DEFLATE_BUF_SIZE]; /* output buffer */ member 458 priv->cx.next_out = priv->outbuf + 2 + DEFLATE_HDRLEN; in ng_deflate_compress() 484 MPASS(priv->outbuf[outlen + 0] == 0x00); in ng_deflate_compress() 485 MPASS(priv->outbuf[outlen + 1] == 0x00); in ng_deflate_compress() 486 MPASS(priv->outbuf[outlen + 2] == 0xff); in ng_deflate_compress() 487 MPASS(priv->outbuf[outlen + 3] == 0xff); in ng_deflate_compress() 497 be16enc(priv->outbuf, PROT_COMPD); in ng_deflate_compress() 498 be16enc(priv->outbuf + 2, priv->seqnum); in ng_deflate_compress() 501 m_copyback(m, 0, outlen, (caddr_t)priv->outbuf); in ng_deflate_compress() 591 priv->cx.next_out = priv->outbuf + 1; in ng_deflate_decompress() [all …]
|
/freebsd/crypto/openssl/crypto/ct/ |
H A D | ct_b64.c | 28 unsigned char *outbuf = NULL; in ct_base64_decode() local 36 outbuf = OPENSSL_malloc(outlen); in ct_base64_decode() 37 if (outbuf == NULL) { in ct_base64_decode() 42 outlen = EVP_DecodeBlock(outbuf, (unsigned char *)in, inlen); in ct_base64_decode() 56 *out = outbuf; in ct_base64_decode() 59 OPENSSL_free(outbuf); in ct_base64_decode()
|
/freebsd/sys/libkern/ |
H A D | iconv_xlat.c | 80 size_t *inbytesleft, char **outbuf, size_t *outbytesleft, in iconv_xlat_conv() argument 88 if (inbuf == NULL || *inbuf == NULL || outbuf == NULL || *outbuf == NULL) in iconv_xlat_conv() 97 dst = *outbuf; in iconv_xlat_conv() 101 *outbuf += n; in iconv_xlat_conv()
|
/freebsd/usr.bin/calendar/ |
H A D | events.c | 81 char *outbuf, *tmp; in convert() local 110 outbuf = output + converted; in convert() 113 converted = iconv(conv, (char **) &inbuf, &inleft, &outbuf, &outleft); in convert() 124 converted = outbuf - output; in convert() 133 outbuf = output + converted; in convert() 137 iconv(conv, NULL, NULL, &outbuf, &outleft); in convert() 140 *outbuf = '\0'; in convert()
|
/freebsd/contrib/sendmail/src/ |
H A D | sfsasl.c | 191 static const char *outbuf = NULL; local 193 static char *outbuf = NULL; local 214 while (outbuf == NULL && outlen == 0) 221 (unsigned int) len, &outbuf, &outlen); 227 outbuf = NULL; 234 if (outbuf == NULL) 243 (void) memcpy(buf, outbuf + offset, size); 251 (void) memcpy(buf, outbuf + offset, (size_t) len); 253 SASL_DEALLOC(outbuf); 255 outbuf = NULL; [all …]
|
/freebsd/sys/crypto/aesni/ |
H A D | aesni.c | 620 uint8_t *authbuf, *buf, *outbuf; in aesni_cipher_crypt() local 654 outbuf = crypto_buffer_contiguous_subsegment(&crp->crp_obuf, in aesni_cipher_crypt() 656 if (outbuf == NULL) { in aesni_cipher_crypt() 659 outbuf = buf; in aesni_cipher_crypt() 661 outbuf = malloc(crp->crp_payload_length, in aesni_cipher_crypt() 663 if (outbuf == NULL) { in aesni_cipher_crypt() 672 outbuf = buf; in aesni_cipher_crypt() 690 crp->crp_payload_length, buf, outbuf, iv); in aesni_cipher_crypt() 692 if (buf != outbuf) in aesni_cipher_crypt() 693 memcpy(outbuf, buf, crp->crp_payload_length); in aesni_cipher_crypt() [all …]
|
/freebsd/sys/dev/acpi_support/ |
H A D | acpi_hp.c | 318 UINT8 instance, char* outbuf, size_t outsize, 952 char* outbuf, size_t outsize, UINT32* sequence, int detail) in acpi_hp_get_cmi_block() argument 964 outbuf[0] = 0; in acpi_hp_get_cmi_block() 1013 strlcat(outbuf, acpi_hp_get_string_from_object( in acpi_hp_get_cmi_block() 1017 while (strlen(outbuf) < outlen) in acpi_hp_get_cmi_block() 1018 strlcat(outbuf, " ", outsize); in acpi_hp_get_cmi_block() 1020 strlcat(outbuf, acpi_hp_get_string_from_object( in acpi_hp_get_cmi_block() 1024 while (strlen(outbuf) < outlen) in acpi_hp_get_cmi_block() 1025 strlcat(outbuf, " ", outsize); in acpi_hp_get_cmi_block() 1026 strlcat(outbuf, acpi_hp_get_string_from_object( in acpi_hp_get_cmi_block() [all …]
|