Home
last modified time | relevance | path

Searched refs:slen (Results 1 – 25 of 235) sorted by relevance

12345678910

/third_party/skia/third_party/externals/abseil-cpp/absl/strings/internal/
Dmemutil.cc36 char* memdup(const char* s, size_t slen) { in memdup() argument
38 if ((copy = malloc(slen)) == nullptr) return nullptr; in memdup()
39 memcpy(copy, s, slen); in memdup()
43 char* memrchr(const char* s, int c, size_t slen) { in memrchr() argument
44 for (const char* e = s + slen - 1; e >= s; e--) { in memrchr()
50 size_t memspn(const char* s, size_t slen, const char* accept) { in memspn() argument
57 if (slen-- == 0) return p - 1 - s; in memspn()
63 size_t memcspn(const char* s, size_t slen, const char* reject) { in memcspn() argument
68 while (slen-- != 0) { in memcspn()
76 char* mempbrk(const char* s, size_t slen, const char* accept) { in mempbrk() argument
[all …]
Dmemutil.h81 char* memdup(const char* s, size_t slen);
82 char* memrchr(const char* s, int c, size_t slen);
83 size_t memspn(const char* s, size_t slen, const char* accept);
84 size_t memcspn(const char* s, size_t slen, const char* reject);
85 char* mempbrk(const char* s, size_t slen, const char* accept);
/third_party/abseil-cpp/absl/strings/internal/
Dmemutil.cc36 char* memdup(const char* s, size_t slen) { in memdup() argument
38 if ((copy = malloc(slen)) == nullptr) return nullptr; in memdup()
39 memcpy(copy, s, slen); in memdup()
43 char* memrchr(const char* s, int c, size_t slen) { in memrchr() argument
44 for (const char* e = s + slen - 1; e >= s; e--) { in memrchr()
50 size_t memspn(const char* s, size_t slen, const char* accept) { in memspn() argument
57 if (slen-- == 0) return p - 1 - s; in memspn()
63 size_t memcspn(const char* s, size_t slen, const char* reject) { in memcspn() argument
68 while (slen-- != 0) { in memcspn()
76 char* mempbrk(const char* s, size_t slen, const char* accept) { in mempbrk() argument
[all …]
Dmemutil.h81 char* memdup(const char* s, size_t slen);
82 char* memrchr(const char* s, int c, size_t slen);
83 size_t memspn(const char* s, size_t slen, const char* accept);
84 size_t memcspn(const char* s, size_t slen, const char* reject);
85 char* mempbrk(const char* s, size_t slen, const char* accept);
/third_party/gettext/gnulib-local/lib/
Daddext.c54 size_t slen = strlen (s), extlen = strlen (ext); in addext() local
58 if (slen + extlen <= _POSIX_NAME_MAX && ! HAVE_DOS_FILE_NAMES) in addext()
80 slen -= dot + 1 - s; in addext()
89 if (slen + extlen <= slen_max) in addext()
90 strcpy (s + slen, ext); in addext()
93 if (slen_max <= slen) in addext()
94 slen = slen_max - 1; in addext()
95 s[slen] = e; in addext()
96 s[slen + 1] = 0; in addext()
/third_party/mbedtls/library/
Dbase64.c45 const unsigned char *src, size_t slen ) in mbedtls_base64_encode() argument
51 if( slen == 0 ) in mbedtls_base64_encode()
57 n = slen / 3 + ( slen % 3 != 0 ); in mbedtls_base64_encode()
73 n = ( slen / 3 ) * 3; in mbedtls_base64_encode()
89 if( i < slen ) in mbedtls_base64_encode()
92 C2 = ( ( i + 1 ) < slen ) ? *src++ : 0; in mbedtls_base64_encode()
98 if( ( i + 1 ) < slen ) in mbedtls_base64_encode()
115 const unsigned char *src, size_t slen ) in mbedtls_base64_decode() argument
126 for( i = n = 0; i < slen; i++ ) in mbedtls_base64_decode()
130 while( i < slen && src[i] == ' ' ) in mbedtls_base64_decode()
[all …]
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/p2p/
Dp2p_sd.c335 u16 slen; in p2p_rx_gas_initial_req() local
365 slen = *pos++; in p2p_rx_gas_initial_req()
366 if (slen > end - pos || slen < 2) { in p2p_rx_gas_initial_req()
370 next = pos + slen; in p2p_rx_gas_initial_req()
383 slen = WPA_GET_LE16(pos); in p2p_rx_gas_initial_req()
385 if (slen > end - pos) in p2p_rx_gas_initial_req()
387 end = pos + slen; in p2p_rx_gas_initial_req()
398 slen = WPA_GET_LE16(pos); in p2p_rx_gas_initial_req()
400 if (slen > end - pos || slen < 3 + 1) { in p2p_rx_gas_initial_req()
491 u16 slen; in p2p_rx_gas_initial_resp() local
[all …]
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/p2p/
Dp2p_sd.c335 u16 slen; in p2p_rx_gas_initial_req() local
365 slen = *pos++; in p2p_rx_gas_initial_req()
366 if (slen > end - pos || slen < 2) { in p2p_rx_gas_initial_req()
370 next = pos + slen; in p2p_rx_gas_initial_req()
383 slen = WPA_GET_LE16(pos); in p2p_rx_gas_initial_req()
385 if (slen > end - pos) in p2p_rx_gas_initial_req()
387 end = pos + slen; in p2p_rx_gas_initial_req()
398 slen = WPA_GET_LE16(pos); in p2p_rx_gas_initial_req()
400 if (slen > end - pos || slen < 3 + 1) { in p2p_rx_gas_initial_req()
491 u16 slen; in p2p_rx_gas_initial_resp() local
[all …]
/third_party/gstreamer/gstplugins_bad/ext/hls/
Dgsthlsdemux-util.c119 guint slen, pcr_pid; in handle_pmt() local
131 slen = GST_READ_UINT16_BE (data + 1) & 0x0FFF; in handle_pmt()
132 if (slen > (gsize) (p + r->packet_size - (data + 1 + 2)) || slen < 5 + 2 + 4) in handle_pmt()
135 slen -= 5; /* bytes after section_length field itself */ in handle_pmt()
136 slen -= 4; /* crc at end */ in handle_pmt()
152 guint slen; in handle_pat() local
163 slen = GST_READ_UINT16_BE (data + 1) & 0x0FFF; in handle_pat()
164 if (slen > (gsize) (p + r->packet_size - (data + 1 + 2)) || slen < 5 + 4 + 4) in handle_pat()
167 slen -= 5; /* bytes after section_length field itself */ in handle_pat()
168 slen -= 4; /* crc at end */ in handle_pat()
[all …]
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/wpa_supplicant/
Dhs20_supplicant.c462 size_t slen, u8 dialog_token) in hs20_process_icon_binary_file() argument
473 icon->image = os_memdup(pos, slen); in hs20_process_icon_binary_file()
476 icon->image_len = slen; in hs20_process_icon_binary_file()
489 if (slen < 4) { in hs20_process_icon_binary_file()
499 slen--; in hs20_process_icon_binary_file()
501 if ((size_t) 1 + pos[0] > slen) { in hs20_process_icon_binary_file()
508 slen -= 1 + pos[0]; in hs20_process_icon_binary_file()
511 if (slen < 2) { in hs20_process_icon_binary_file()
518 slen -= 2; in hs20_process_icon_binary_file()
520 if (data_len > slen) { in hs20_process_icon_binary_file()
[all …]
/third_party/libinput/src/
Dutil-strings.c128 size_t slen = 0; in strv_join() local
138 slen += strlen(*s); in strv_join()
141 assert(slen < 1000); in strv_join()
146 slen += (count - 1) * strlen(joiner); in strv_join()
148 str = zalloc(slen + 1); /* trailing \0 */ in strv_join()
Dutil-strings.h182 size_t slen = strlen(str); in safe_atod() local
186 for (size_t i = 0; i < slen; i++) { in safe_atod()
349 size_t slen = strlen(str); in strendswith() local
353 if (slen == 0 || suffixlen == 0 || suffixlen > slen) in strendswith()
356 offset = slen - suffixlen; in strendswith()
/third_party/wpa_supplicant/wpa_supplicant-2.9/wpa_supplicant/
Dhs20_supplicant.c461 size_t slen, u8 dialog_token) in hs20_process_icon_binary_file() argument
472 icon->image = os_memdup(pos, slen); in hs20_process_icon_binary_file()
475 icon->image_len = slen; in hs20_process_icon_binary_file()
488 if (slen < 4) { in hs20_process_icon_binary_file()
498 slen--; in hs20_process_icon_binary_file()
500 if ((size_t) 1 + pos[0] > slen) { in hs20_process_icon_binary_file()
507 slen -= 1 + pos[0]; in hs20_process_icon_binary_file()
510 if (slen < 2) { in hs20_process_icon_binary_file()
517 slen -= 2; in hs20_process_icon_binary_file()
519 if (data_len > slen) { in hs20_process_icon_binary_file()
[all …]
/third_party/ltp/testcases/network/rpc/rpc-tirpc/tests_pack/lib/
Dlibrpc-tirpc.c32 socklen_t slen; in bound_socket() local
39 slen = sizeof(*addr4); in bound_socket()
46 slen = sizeof(*addr6); in bound_socket()
63 if (bind(sock, (struct sockaddr *)&addr, slen) < 0) { in bound_socket()
/third_party/boost/libs/dynamic_bitset/test/
Ddyn_bitset_unit_tests4.cpp101 std::streamsize slen = (std::streamsize)(strings[si].length()); in run_test_cases() local
104 >=(std::streamsize)(1+slen*2) ); in run_test_cases()
109 const std::streamsize widths[] = { -1 - slen/2, 0, slen/2, 1 + slen*2 }; in run_test_cases()
239 const std::streamsize slen = (std::streamsize)(strings[si].length()); in run_test_cases() local
240 assert((std::numeric_limits<std::streamsize>::max)() >= (std::streamsize)(1+slen*2)); in run_test_cases()
242 std::streamsize widths[] = { -1, 0, slen/2, slen, 1 + slen*2 }; in run_test_cases()
/third_party/f2fs-tools/tools/sg_write_buffer/
Dsg_cmds_basic.c120 const unsigned char * sbp, int slen, bool noisy, in sg_cmds_process_helper() argument
128 scat = sg_err_category_sense(sbp, slen); in sg_cmds_process_helper()
159 sg_get_sense_str(NULL, sbp, slen, (verbose > 1), in sg_cmds_process_helper()
190 int got, cat, duration, slen, resid, resp_code, sstat; in sg_cmds_process_resp() local
225 slen = get_scsi_pt_sense_len(ptvp); in sg_cmds_process_resp()
228 if (sbp && (slen > 7)) { in sg_cmds_process_resp()
234 sg_err_category_sense(sbp, slen); in sg_cmds_process_resp()
237 sg_err_category_sense(sbp, slen); in sg_cmds_process_resp()
288 return sg_cmds_process_helper(leadin, mx_di_len, resid, sbp, slen, in sg_cmds_process_resp()
296 transport_sense = (slen > 0); in sg_cmds_process_resp()
[all …]
/third_party/openssl/crypto/kdf/
Dtls1_prf.c17 const unsigned char *sec, size_t slen,
248 const unsigned char *sec, size_t slen, in tls1_prf_alg() argument
256 if (!tls1_prf_P_hash(EVP_md5(), sec, slen/2 + (slen & 1), in tls1_prf_alg()
264 if (!tls1_prf_P_hash(EVP_sha1(), sec + slen/2, slen/2 + (slen & 1), in tls1_prf_alg()
274 if (!tls1_prf_P_hash(md, sec, slen, seed, seed_len, out, olen)) in tls1_prf_alg()
/third_party/libwebsockets/lib/secure-streams/system/auth-sigv4/
Dsign.c502 size_t slen; in lws_aws_filesystem_credentials_helper() local
521 slen = (size_t)(rd - lws_ptr_diff(str, line)); in lws_aws_filesystem_credentials_helper()
523 while (slen && *str == ' ') { in lws_aws_filesystem_credentials_helper()
525 slen--; in lws_aws_filesystem_credentials_helper()
528 while (slen && (str[slen - 1] == '\r' || in lws_aws_filesystem_credentials_helper()
529 str[slen - 1] == '\n' || in lws_aws_filesystem_credentials_helper()
530 str[slen - 1] == ' ')) in lws_aws_filesystem_credentials_helper()
531 slen--; in lws_aws_filesystem_credentials_helper()
533 val = malloc(slen + 1); in lws_aws_filesystem_credentials_helper()
537 strncpy(val, str, slen); in lws_aws_filesystem_credentials_helper()
[all …]
/third_party/openssl/crypto/asn1/
Da_d2i_fp.c105 long slen; in asn1_d2i_read_bio() local
140 inf = ASN1_get_object(&q, &slen, &tag, &xclass, len - off); in asn1_d2i_read_bio()
161 } else if (eos && (slen == 0) && (tag == V_ASN1_EOC)) { in asn1_d2i_read_bio()
170 want = slen; in asn1_d2i_read_bio()
212 if (off + slen < off) { in asn1_d2i_read_bio()
216 off += slen; in asn1_d2i_read_bio()
/third_party/iptables/extensions/
Dlibxt_string.c94 int i=0, slen, sindex=0, schar; in parse_hex_string() local
98 slen = strlen(s); in parse_hex_string()
100 if (slen == 0) { in parse_hex_string()
105 while (i < slen) { in parse_hex_string()
123 if (i+1 >= slen) in parse_hex_string()
130 if (i+1 >= slen) { in parse_hex_string()
138 if (i+1 >= slen) { in parse_hex_string()
142 if (i+2 >= slen) { in parse_hex_string()
/third_party/libsnd/programs/
Dcommon.c180 { int slen = strlen (binfo.coding_history) ; in merge_broadcast_info() local
182 while (slen > 1 && isspace (binfo.coding_history [slen - 1])) in merge_broadcast_info()
183 slen -- ; in merge_broadcast_info()
185 … memcpy (binfo.coding_history + slen, info->coding_history, sizeof (binfo.coding_history) - slen) ; in merge_broadcast_info()
188 { size_t slen = MIN (strlen (info->coding_history), sizeof (binfo.coding_history)) ; in merge_broadcast_info() local
191 memcpy (binfo.coding_history, info->coding_history, slen) ; in merge_broadcast_info()
192 binfo.coding_history_size = slen ; in merge_broadcast_info()
/third_party/gstreamer/gstplugins_bad/gst/mxf/
Dmxftypes.c164 guint8 slen, i; in mxf_ber_encode_size() local
174 slen = 0; in mxf_ber_encode_size()
176 tmp[slen] = size & 0xff; in mxf_ber_encode_size()
178 slen++; in mxf_ber_encode_size()
181 ber[0] = 0x80 | slen; in mxf_ber_encode_size()
182 for (i = 0; i < slen; i++) { in mxf_ber_encode_size()
183 ber[i + 1] = tmp[slen - i - 1]; in mxf_ber_encode_size()
186 return slen + 1; in mxf_ber_encode_size()
194 guint slen; in mxf_fill_to_buffer() local
197 slen = mxf_ber_encode_size (size, ber); in mxf_fill_to_buffer()
[all …]
/third_party/gstreamer/gstplugins_good/gst/isomp4/
Dgstrtpxqtdepay.c553 guint slen; in gst_rtp_xqt_depay_process() local
576 slen = (payload[2] << 8) | payload[3]; in gst_rtp_xqt_depay_process()
585 if (slen > payload_len) in gst_rtp_xqt_depay_process()
586 slen = payload_len; in gst_rtp_xqt_depay_process()
588 outbuf = gst_buffer_new_and_alloc (slen); in gst_rtp_xqt_depay_process()
589 gst_buffer_fill (outbuf, 0, payload, slen); in gst_rtp_xqt_depay_process()
596 slen = GST_ROUND_UP_4 (slen); in gst_rtp_xqt_depay_process()
598 payload += slen; in gst_rtp_xqt_depay_process()
599 payload_len -= slen; in gst_rtp_xqt_depay_process()
/third_party/mbedtls/include/mbedtls/
Decdsa.h310 unsigned char *sig, size_t sig_size, size_t *slen,
357 unsigned char *sig, size_t sig_size, size_t *slen,
391 const unsigned char *sig, size_t slen );
426 const unsigned char *sig, size_t slen,
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/utils/
Dwpa_debug.c347 size_t slen = len; in _wpa_hexdump()
353 if (slen > 32) in _wpa_hexdump()
354 slen = 32; in _wpa_hexdump()
355 strbuf = os_malloc(1 + 3 * slen); in _wpa_hexdump()
362 for (i = 0; i < slen; i++) in _wpa_hexdump()
373 len > slen ? " ..." : ""); in _wpa_hexdump()
374 bin_clear_free(strbuf, 1 + 3 * slen); in _wpa_hexdump()
403 size_t slen = len; in _wpa_hexdump()
410 if (slen > 32) in _wpa_hexdump()
411 slen = 32; in _wpa_hexdump()
[all …]

12345678910