Home
last modified time | relevance | path

Searched refs:src_len (Results 1 – 25 of 63) sorted by relevance

123

/third_party/gn/src/base/strings/
Dutf_string_conversion_utils.cc15 int32_t src_len, in ReadUnicodeCharacter() argument
22 CBU8_NEXT(src, *char_index, src_len, code_point); in ReadUnicodeCharacter()
34 int32_t src_len, in ReadUnicodeCharacter() argument
39 *char_index + 1 >= src_len || !CBU16_IS_TRAIL(src[*char_index + 1])) { in ReadUnicodeCharacter()
95 size_t src_len, in PrepareForUTF8Output() argument
98 if (src_len == 0) in PrepareForUTF8Output()
102 output->reserve(src_len); in PrepareForUTF8Output()
105 output->reserve(src_len * 3); in PrepareForUTF8Output()
114 size_t src_len, in PrepareForUTF16Or32Output() argument
117 if (src_len == 0) in PrepareForUTF16Or32Output()
[all …]
Dutf_string_conversions.cc63 int32_t src_len, in DoUTFConversion() argument
68 for (int32_t i = 0; i < src_len;) { in DoUTFConversion()
70 CBU8_NEXT(src, i, src_len, code_point); in DoUTFConversion()
85 int32_t src_len, in DoUTFConversion() argument
102 while (i < src_len - 1) { in DoUTFConversion()
120 if (i < src_len) in DoUTFConversion()
159 bool UTF8ToUTF16(const char* src, size_t src_len, std::u16string* output) { in UTF8ToUTF16() argument
160 return UTFConversion(std::string_view(src, src_len), output); in UTF8ToUTF16()
171 bool UTF16ToUTF8(const char16_t* src, size_t src_len, std::string* output) { in UTF16ToUTF8() argument
172 return UTFConversion(std::u16string_view(src, src_len), output); in UTF16ToUTF8()
Dutf_string_conversion_utils.h45 int32_t src_len,
51 int32_t src_len,
72 void PrepareForUTF8Output(const CHAR* src, size_t src_len, std::string* output);
77 void PrepareForUTF16Or32Output(const char* src, size_t src_len, STRING* output);
Dutf_offset_string_conversions.cc188 size_t src_len, in ConvertUnicode() argument
195 int32_t src_len32 = static_cast<int32_t>(src_len); in ConvertUnicode()
223 size_t src_len, in UTF8ToUTF16WithAdjustments() argument
226 PrepareForUTF16Or32Output(src, src_len, output); in UTF8ToUTF16WithAdjustments()
227 return ConvertUnicode(src, src_len, output, adjustments); in UTF8ToUTF16WithAdjustments()
Dutf_string_conversions.h15 bool UTF8ToUTF16(const char* src, size_t src_len, std::u16string* output);
17 bool UTF16ToUTF8(const char16_t* src, size_t src_len, std::string* output);
/third_party/rust/crates/rust-openssl/openssl/src/
Dbase64.rs15 let src_len = src.len() as LenType; in encode_block() localVariable
17 let len = encoded_len(src_len).unwrap(); in encode_block()
25 let out_len = ffi::EVP_EncodeBlock(out.as_mut_ptr(), src.as_ptr(), src_len); in encode_block()
46 let src_len = src.len() as LenType; in decode_block() localVariable
48 let len = decoded_len(src_len).unwrap(); in decode_block()
60 src_len, in decode_block()
75 fn encoded_len(src_len: LenType) -> Option<LenType> { in encoded_len()
76 let mut len = (src_len / 3).checked_mul(4)?; in encoded_len()
78 if src_len % 3 != 0 { in encoded_len()
87 fn decoded_len(src_len: LenType) -> Option<LenType> { in decoded_len()
[all …]
/third_party/musl/libc-test/src/functionalext/supplement/string/
Dwcpncpy.c30 size_t src_len = 13; in wcpncpy_0100() local
31 wchar_t *result = wcpncpy(dst, src, src_len + 1); in wcpncpy_0100()
32 if (wcscmp(result, dst + src_len) != 0) { in wcpncpy_0100()
33 t_error("%s wcpncpy get result is %ls are not want %ls\n", __func__, result, dst + src_len); in wcpncpy_0100()
49 size_t src_len = 13; in wcpncpy_0200() local
68 size_t src_len = 13; in wcpncpy_0300() local
70 if (wcscmp(result, dst + src_len) != 0) { in wcpncpy_0300()
71 t_error("%s wcpncpy get result is %ls are not want %ls\n", __func__, result, dst + src_len); in wcpncpy_0300()
/third_party/curl/tests/server/
Dgetpart.c212 size_t src_len, /* source buffer length */ in appenddata() argument
217 if(!src_len) in appenddata()
220 need_alloc = src_len + *dst_len + 1; in appenddata()
223 if(src_buf[src_len - 1] == '\r') in appenddata()
224 src_len--; in appenddata()
226 if(src_buf[src_len - 1] == '\n') in appenddata()
227 src_len--; in appenddata()
242 memcpy(*dst_buf + *dst_len, src_buf, src_len); in appenddata()
243 *dst_len += src_len; in appenddata()
254 size_t src_len = 0; in decodedata() local
[all …]
/third_party/FreeBSD/sys/arm/arm/
Din_cksum.c109 int src_len = strlen(src); in in_cksum_copy() local
111 if (src_len >= len) { in in_cksum_copy()
112 src_len = len; in in_cksum_copy()
114 if (memcpy_s(dst, len, src, src_len) != EOK) { in in_cksum_copy()
152 int src_len = strlen(src); in csum_partial_copy_nocheck() local
154 if (src_len >= len) { in csum_partial_copy_nocheck()
155 src_len = len; in csum_partial_copy_nocheck()
157 if (memcpy_s(dst, len, src, src_len) != EOK) { in csum_partial_copy_nocheck()
/third_party/openssl/crypto/
Dparams.c92 const unsigned char *src, size_t src_len, in copy_integer() argument
99 if (src_len < dest_len) { in copy_integer()
100 n = dest_len - src_len; in copy_integer()
102 memcpy(dest + n, src, src_len); in copy_integer()
104 n = src_len - dest_len; in copy_integer()
115 if (src_len < dest_len) { in copy_integer()
116 n = dest_len - src_len; in copy_integer()
117 memset(dest + src_len, pad, n); in copy_integer()
118 memcpy(dest, src, src_len); in copy_integer()
120 n = src_len - dest_len; in copy_integer()
[all …]
/third_party/node/deps/openssl/openssl/crypto/
Dparams.c94 const unsigned char *src, size_t src_len, in copy_integer() argument
101 if (src_len < dest_len) { in copy_integer()
102 n = dest_len - src_len; in copy_integer()
104 memcpy(dest + n, src, src_len); in copy_integer()
106 n = src_len - dest_len; in copy_integer()
117 if (src_len < dest_len) { in copy_integer()
118 n = dest_len - src_len; in copy_integer()
119 memset(dest + src_len, pad, n); in copy_integer()
120 memcpy(dest, src, src_len); in copy_integer()
122 n = src_len - dest_len; in copy_integer()
[all …]
/third_party/FreeBSD/stand/usb/
Dusb_busdma_loader.c183 usbd_copy_from_user(void *dest, uint32_t dest_len, const void *src, uint32_t src_len) in usbd_copy_from_user() argument
187 if (!LOS_IsUserAddressRange((vaddr_t)(UINTPTR)src, src_len)) { in usbd_copy_from_user()
188 ret = memcpy_s(dest, dest_len, src, src_len); in usbd_copy_from_user()
190 ret = ((dest_len >= src_len) ? LOS_ArchCopyFromUser(dest, src, src_len) : ERANGE_AND_RESET); in usbd_copy_from_user()
198 usbd_copy_to_user(void *dest, uint32_t dest_len, const void *src, uint32_t src_len) in usbd_copy_to_user() argument
203 ret = memcpy_s(dest, dest_len, src, src_len); in usbd_copy_to_user()
205 ret = ((dest_len >= src_len) ? LOS_ArchCopyToUser(dest, src, src_len) : ERANGE_AND_RESET); in usbd_copy_to_user()
/third_party/openh264/test/utils/
DHashFunctions.h10 static void ToHashStr (char* dst, const unsigned char* src, size_t src_len) { in ToHashStr() argument
11 for (size_t i = 0; i < src_len; ++i) { in ToHashStr()
14 dst[src_len * 2] = '\0'; in ToHashStr()
/third_party/ffmpeg/libavcodec/
Dbmvvideo.c57 static int decode_bmv_frame(const uint8_t *source, int src_len, uint8_t *frame, int frame_off) in decode_bmv_frame() argument
60 int tmplen = src_len; in decode_bmv_frame()
61 const uint8_t *src, *source_end = source + src_len; in decode_bmv_frame()
71 if (src_len <= 0) in decode_bmv_frame()
79 src = source + src_len - 1; in decode_bmv_frame()
170 if (source + src_len - src < len) in decode_bmv_frame()
/third_party/musl/porting/linux/user/src/fortify/
Dfortify.c180 size_t src_len = strlen(src) + strlen(dest); in __strncat_chk() local
181 __diagnose_buffer_access("strncat", "write into", src_len, dst_buf_size); in __strncat_chk()
187 size_t src_len = strlen(src) + strlen(dest); in __strcat_chk() local
188 __diagnose_buffer_access("strcat", "write into", src_len, dst_buf_size); in __strcat_chk()
194 size_t src_len = strlen(src) + 1; in __strcpy_chk() local
195 __diagnose_buffer_access("strcpy", "write into", src_len, dst_len); in __strcpy_chk()
223 size_t src_len = strlen(src); in __stpcpy_chk() local
224 __diagnose_buffer_access("stpcpy", "write into", src_len, dst_len); in __stpcpy_chk()
/third_party/musl/src/fortify/linux/
Dfortify.c191 size_t src_len = strlen(src) + strlen(dest); in __strncat_chk() local
192 __diagnose_buffer_access("strncat", "write into", src_len, dst_buf_size); in __strncat_chk()
198 size_t src_len = strlen(src) + strlen(dest); in __strcat_chk() local
199 __diagnose_buffer_access("strcat", "write into", src_len, dst_buf_size); in __strcat_chk()
205 size_t src_len = strlen(src) + 1; in __strcpy_chk() local
206 __diagnose_buffer_access("strcpy", "write into", src_len, dst_len); in __strcpy_chk()
234 size_t src_len = strlen(src); in __stpcpy_chk() local
235 __diagnose_buffer_access("stpcpy", "write into", src_len, dst_len); in __stpcpy_chk()
/third_party/ffmpeg/libavformat/
Drtpdec_h264.c219 int src_len = len; in ff_h264_handle_aggregated_packet() local
221 while (src_len > 2) { in ff_h264_handle_aggregated_packet()
226 src_len -= 2; in ff_h264_handle_aggregated_packet()
228 if (nal_size <= src_len) { in ff_h264_handle_aggregated_packet()
243 "nal size exceeds length: %d %d\n", nal_size, src_len); in ff_h264_handle_aggregated_packet()
249 src_len -= nal_size + skip_between; in ff_h264_handle_aggregated_packet()
Davc.c303 uint8_t *ff_nal_unit_extract_rbsp(const uint8_t *src, uint32_t src_len, in ff_nal_unit_extract_rbsp() argument
309 dst = av_malloc(src_len + AV_INPUT_BUFFER_PADDING_SIZE); in ff_nal_unit_extract_rbsp()
315 while (i < header_len && i < src_len) in ff_nal_unit_extract_rbsp()
318 while (i + 2 < src_len) in ff_nal_unit_extract_rbsp()
326 while (i < src_len) in ff_nal_unit_extract_rbsp()
/third_party/mbedtls/tests/suites/
Dtest_suite_aes.function174 size_t key_len, src_len, dst_len, data_unit_len;
185 src = mbedtls_test_unhexify_alloc(hex_src_string, &src_len);
187 TEST_ASSERT(src_len == dst_len);
192 TEST_ASSERT(mbedtls_aes_crypt_xts(&ctx, MBEDTLS_AES_ENCRYPT, src_len,
218 size_t key_len, src_len, dst_len, data_unit_len;
229 src = mbedtls_test_unhexify_alloc(hex_src_string, &src_len);
231 TEST_ASSERT(src_len == dst_len);
236 TEST_ASSERT(mbedtls_aes_crypt_xts(&ctx, MBEDTLS_AES_DECRYPT, src_len,
Dtest_suite_md.function159 size_t src_len = strlen(text_src_string);
168 TEST_EQUAL(0, mbedtls_md(md_info, src, src_len, output));
203 size_t src_len = strlen(text_src_string);
215 halfway = src_len / 2;
231 TEST_EQUAL(0, mbedtls_md_update(&ctx, src + halfway, src_len - halfway));
238 TEST_EQUAL(0, mbedtls_md_update(&ctx_copy, src + halfway, src_len - halfway));
Dtest_suite_constant_time.function125 size_t src_len = offset_max + len;
129 ASSERT_ALLOC(src, src_len);
132 mbedtls_test_rnd_std_rand(NULL, src, src_len);
Dtest_suite_base64.function83 size_t len, src_len;
89 src_len = strlen((char *) src_str);
92 TEST_ASSERT(mbedtls_base64_encode(dst_str, dst_buf_size, &len, src_str, src_len) == result);
/third_party/skia/third_party/externals/harfbuzz/src/
Dhb-ot-name.cc74 unsigned int src_len = bytes.length / sizeof (typename in_utf_t::codepoint_t); in hb_ot_name_convert_utf() local
76 const typename in_utf_t::codepoint_t *src_end = src + src_len; in hb_ot_name_convert_utf()
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/p2p/
Dp2p_parse.c19 const void *src, size_t src_len) in p2p_copy_filter_devname() argument
23 if (src_len >= dst_len) in p2p_copy_filter_devname()
24 src_len = dst_len - 1; in p2p_copy_filter_devname()
25 os_memcpy(dst, src, src_len); in p2p_copy_filter_devname()
26 dst[src_len] = '\0'; in p2p_copy_filter_devname()
27 for (i = 0; i < src_len; i++) { in p2p_copy_filter_devname()
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/p2p/
Dp2p_parse.c19 const void *src, size_t src_len) in p2p_copy_filter_devname() argument
23 if (src_len >= dst_len) in p2p_copy_filter_devname()
24 src_len = dst_len - 1; in p2p_copy_filter_devname()
25 os_memcpy(dst, src, src_len); in p2p_copy_filter_devname()
26 dst[src_len] = '\0'; in p2p_copy_filter_devname()
27 for (i = 0; i < src_len; i++) { in p2p_copy_filter_devname()

123