Home
last modified time | relevance | path

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

123456789

/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/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/nghttp2/lib/
Dnghttp2_http.c1077 ssize_t slen; in sf_parse_params() local
1084 slen = sf_parse_key(p, end); in sf_parse_params()
1085 if (slen < 0) { in sf_parse_params()
1089 p += slen; in sf_parse_params()
1096 slen = sf_parse_bare_item(NULL, p, end); in sf_parse_params()
1097 if (slen < 0) { in sf_parse_params()
1101 p += slen; in sf_parse_params()
1111 ssize_t slen; in sf_parse_item() local
1113 slen = sf_parse_bare_item(dest, p, end); in sf_parse_item()
1114 if (slen < 0) { in sf_parse_item()
[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/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/libinput/src/
Dutil-strings.h211 size_t slen = strlen(str); in safe_atod() local
215 for (size_t i = 0; i < slen; i++) { in safe_atod()
379 size_t slen = strlen(str); in strendswith() local
383 if (slen == 0 || suffixlen == 0 || suffixlen > slen) in strendswith()
386 offset = slen - suffixlen; in strendswith()
417 size_t slen = min(strlen(str), 512); in str_sanitize() local
418 char *sanitized = zalloc(2 * slen + 1); in str_sanitize()
422 for (size_t i = 0; i < slen; i++) { in str_sanitize()
Dutil-strings.c158 size_t slen = 0; in strv_join() local
168 slen += strlen(*s); in strv_join()
171 assert(slen < 1000); in strv_join()
176 slen += (count - 1) * strlen(joiner); in strv_join()
178 str = zalloc(slen + 1); /* trailing \0 */ in strv_join()
/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/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/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/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/openssl/crypto/asn1/
Da_d2i_fp.c121 long slen; in asn1_d2i_read_bio() local
160 inf = ASN1_get_object(&q, &slen, &tag, &xclass, diff); in asn1_d2i_read_bio()
180 } else if (eos && (slen == 0) && (tag == V_ASN1_EOC)) { in asn1_d2i_read_bio()
189 want = slen; in asn1_d2i_read_bio()
230 if (off + slen < off) { in asn1_d2i_read_bio()
234 off += slen; in asn1_d2i_read_bio()
Df_int.c59 int num = 0, slen = 0, first = 1; in a2i_ASN1_INTEGER() local
108 if (num + i > slen) { in a2i_ASN1_INTEGER()
109 sp = OPENSSL_clear_realloc(s, slen, num + i * 2); in a2i_ASN1_INTEGER()
116 slen = num + i * 2; in a2i_ASN1_INTEGER()
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/utils/
Dwpa_debug.c345 size_t slen = len; in _wpa_hexdump()
351 if (slen > 32) in _wpa_hexdump()
352 slen = 32; in _wpa_hexdump()
353 strbuf = os_malloc(1 + 3 * slen); in _wpa_hexdump()
360 for (i = 0; i < slen; i++) in _wpa_hexdump()
371 len > slen ? " ..." : ""); in _wpa_hexdump()
372 bin_clear_free(strbuf, 1 + 3 * slen); in _wpa_hexdump()
401 size_t slen = len; in _wpa_hexdump()
408 if (slen > 32) in _wpa_hexdump()
409 slen = 32; in _wpa_hexdump()
[all …]
/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 …]
/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/libuv/src/unix/
Dtcp.c33 socklen_t slen; in new_socket() local
50 slen = sizeof(saddr); in new_socket()
52 if (getsockname(uv__stream_fd(handle), (struct sockaddr*) &saddr, &slen)) { in new_socket()
57 if (bind(uv__stream_fd(handle), (struct sockaddr*) &saddr, slen)) { in new_socket()
69 socklen_t slen; in maybe_new_socket() local
87 slen = sizeof(saddr); in maybe_new_socket()
89 if (getsockname(uv__stream_fd(handle), (struct sockaddr*) &saddr, &slen)) in maybe_new_socket()
102 if (bind(uv__stream_fd(handle), (struct sockaddr*) &saddr, slen)) in maybe_new_socket()
/third_party/flutter/skia/third_party/externals/sdl/test/
Dtestautomation_rwops.c520 int slen = 26; in rwops_testCompareRWFromMemWithRWFromFile() local
536 buffer_file[slen] = 0; in rwops_testCompareRWFromMemWithRWFromFile()
537 buffer_mem[slen] = 0; in rwops_testCompareRWFromMemWithRWFromFile()
540 rwops_mem = SDL_RWFromMem((void *)RWopsAlphabetString, slen); in rwops_testCompareRWFromMemWithRWFromFile()
564 …SDLTest_AssertCheck(buffer_mem[slen] == 0, "Verify mem buffer termination; expected: 0, got: %d", … in rwops_testCompareRWFromMemWithRWFromFile()
565 …SDLTest_AssertCheck(buffer_file[slen] == 0, "Verify file buffer termination; expected: 0, got: %d"… in rwops_testCompareRWFromMemWithRWFromFile()
567 SDL_strncmp(buffer_mem, RWopsAlphabetString, slen) == 0, in rwops_testCompareRWFromMemWithRWFromFile()
570 SDL_strncmp(buffer_file, RWopsAlphabetString, slen) == 0, in rwops_testCompareRWFromMemWithRWFromFile()
/third_party/node/src/
Dbase64-inl.h124 size_t slen, in base64_encode() argument
129 CHECK(dlen >= base64_encoded_size(slen, mode) && in base64_encode()
132 dlen = base64_encoded_size(slen, mode); in base64_encode()
145 n = slen / 3 * 3; in base64_encode()
161 switch (slen - n) { in base64_encode()

123456789