Home
last modified time | relevance | path

Searched refs:strLen (Results 1 – 25 of 159) sorted by relevance

1234567

/ohos5.0/foundation/distributeddatamgr/preferences/frameworks/ndk/src/
H A Doh_preferences_value.cpp129 size_t strLen = str.size(); in OH_PreferencesValue_GetString() local
130 if (strLen >= SIZE_MAX) { in OH_PreferencesValue_GetString()
131 LOG_ERROR("string length overlimit: %{public}zu", strLen); in OH_PreferencesValue_GetString()
134 void *ptr = malloc(strLen + 1); // free by caller in OH_PreferencesValue_GetString()
140 int sysErr = memset_s(*value, (strLen + 1), 0, (strLen + 1)); in OH_PreferencesValue_GetString()
144 if (strLen > 0) { in OH_PreferencesValue_GetString()
145 sysErr = memcpy_s(*value, strLen, str.c_str(), strLen); in OH_PreferencesValue_GetString()
152 *valueLen = strLen + 1; in OH_PreferencesValue_GetString()
/ohos5.0/foundation/communication/wifi/wifi/test/wifi_standard/wifi_hal/unittest/
H A Dwifi_hal_common_func_test.cpp43 int strLen = MAC_LEN + 1; variable
44 EXPECT_EQ(ConvertMacToStr(mac, macSize, macStr, strLen), -1);
52 int strLen = MAC_LEN + 1; variable
53 EXPECT_EQ(ConvertMacToStr(mac, macSize, macStr, strLen), -1);
61 int strLen = MAC_LEN + 1; variable
62 EXPECT_EQ(ConvertMacToStr(mac, macSize, macStr, strLen), -1);
70 int strLen = MAC_LEN; variable
71 EXPECT_EQ(ConvertMacToStr(mac, macSize, macStr, strLen), -1);
79 int strLen = MAC_LEN + 1; variable
80 EXPECT_EQ(ConvertMacToStr(mac, macSize, macStr, strLen), 0);
/ohos5.0/foundation/communication/wifi/wifi/test/wifi_standard/wifi_framework/wifi_manage/wifi_native/client/hdi_client/hdi_interface/
H A Dwifi_hdi_wpa_sta_impl_test.cpp251 int strLen = MAC_LEN + 1; variable
252 int result = ConvertMacToStr(mac, macSize, macStr, strLen);
261 int strLen = MAC_LEN + 1; variable
262 int result = ConvertMacToStr(mac, macSize, macStr, strLen);
271 int strLen = MAC_LEN + 1; variable
281 int strLen = LENTH; variable
291 int strLen = MAC_LEN + 1; variable
301 int strLen = MAC_LEN; variable
311 int strLen = LENTH; variable
321 int strLen = MAC_LEN + 1; variable
[all …]
/ohos5.0/drivers/hdf_core/framework/utils/src/
H A Dhdf_cstring.c31 size_t strLen = strlen(str); in HdfCStringObtain() local
32 if (strLen > CSTRING_MAX) { in HdfCStringObtain()
35 size = sizeof(struct HdfCString) + strLen + 1; in HdfCStringObtain()
41 if (strncpy_s(instance->value, strLen + 1, str, strLen) != EOK) { in HdfCStringObtain()
46 instance->size = (int)strLen; in HdfCStringObtain()
/ohos5.0/drivers/peripheral/distributed_camera/hdi_service/src/utils/
H A Danonymous_string.cpp29 size_t strLen = value.length(); in GetAnonyString() local
30 if (strLen < INT32_MIN_ID_LENGTH) { in GetAnonyString()
34 if (strLen <= INT32_SHORT_ID_LENGTH) { in GetAnonyString()
37 res += value[strLen - 1]; in GetAnonyString()
41 res.append(value, strLen - INT32_PLAINTEXT_LENGTH, INT32_PLAINTEXT_LENGTH); in GetAnonyString()
/ohos5.0/foundation/distributeddatamgr/preferences/frameworks/native/src/
H A Dpreferences_value_parcel.cpp75 return strLen; in CalSize()
204 if (strLen == 0) { in MarshallingStringValue()
208 stringValue.c_str(), strLen); in MarshallingStringValue()
253 if (strLen == 0) { in MarshallingStringArrayValue()
256 errCode = memcpy_s(startAddr, strLen, strVec[i].c_str(), strLen); in MarshallingStringArrayValue()
261 startAddr += strLen; in MarshallingStringArrayValue()
488 if (strLen == 0) { in UnmarshallingStringValue()
491 strValue.resize(strLen); in UnmarshallingStringValue()
493 strLen); in UnmarshallingStringValue()
523 if (strLen == 0) { in UnmarshallingStringArrayValue()
[all …]
/ohos5.0/foundation/arkui/ui_lite/frameworks/common/
H A Dimage.cpp120 size_t strLen = strlen(src) + 1; in SetStandardSrc() local
121 char* imagePath = static_cast<char*>(UIMalloc(static_cast<uint32_t>(strLen))); in SetStandardSrc()
126 if (strcpy_s(imagePath, strLen, src) != EOK) { in SetStandardSrc()
149 size_t strLen = strlen(src) + strlen(suffixName) + 1; in SetLiteSrc() local
150 char* imagePath = static_cast<char*>(UIMalloc(static_cast<uint32_t>(strLen))); in SetLiteSrc()
155 if (memcpy_s(imagePath, strLen, src, strLen) != EOK) { in SetLiteSrc()
166 if (memcpy_s(imagePath, strLen, src, strLen) != EOK) { in SetLiteSrc()
179 if (memcpy_s(imagePath, strLen, src, strLen) != EOK) { in SetLiteSrc()
244 size_t strLen = strlen(src) + 1; in PreParse() local
245 char* path = static_cast<char*>(UIMalloc(static_cast<uint32_t>(strLen))); in PreParse()
[all …]
/ohos5.0/foundation/filemanagement/dfs_service/utils/log/src/
H A Dutils_log.cpp33 size_t strLen = value.length(); in GetAnonyString() local
34 if (strLen < INT32_MIN_ID_LENGTH) { in GetAnonyString()
38 if (strLen <= INT32_SHORT_ID_LENGTH) { in GetAnonyString()
41 res += value[strLen - 1]; in GetAnonyString()
45 …res.append(value, INT32_PLAINTEXT_LENGTH + tmpStr.length(), strLen - INT32_PLAINTEXT_LENGTH - tmpS… in GetAnonyString()
/ohos5.0/foundation/filemanagement/storage_service/services/storage_manager/utils/src/
H A Dstorage_utils.cpp43 size_t strLen = value.length(); in GetAnonyString() local
44 if (strLen < INT32_MIN_ID_LENGTH) { in GetAnonyString()
48 if (strLen <= INT32_SHORT_ID_LENGTH) { in GetAnonyString()
51 res += value[strLen - 1]; in GetAnonyString()
55 res.append(value, strLen - INT32_PLAINTEXT_LENGTH, INT32_PLAINTEXT_LENGTH); in GetAnonyString()
/ohos5.0/foundation/filemanagement/app_file_service/utils/src/b_anony/
H A Db_anony.cpp30 size_t strLen = value.length(); in GetAnonyString() local
31 if (strLen < anonyLength) { in GetAnonyString()
35 if (strLen <= shortPlaintextLength) { in GetAnonyString()
38 result += value[strLen - 1]; in GetAnonyString()
42 result += value.substr(strLen - plaintextLength, plaintextLength); in GetAnonyString()
/ohos5.0/foundation/filemanagement/file_api/utils/filemgmt_libn/src/
H A Dn_val.cpp64 auto [succ, path, strLen] = ToUTF8String(); in ToUTF8StringPath()
65 if (succ == false || std::strlen(path.get()) < strLen) { in ToUTF8StringPath()
68 return make_tuple(true, move(path), strLen); in ToUTF8StringPath()
73 size_t strLen = 0; in ToUTF8String() local
78 if (strLen == std::numeric_limits<size_t>::max()) { in ToUTF8String()
82 size_t bufLen = strLen + 1; in ToUTF8String()
91 return make_tuple(status == napi_ok, move(str), strLen); in ToUTF8String()
111 size_t strLen = 0; in ToUTF16String() local
117 auto str = CreateUniquePtr<char16_t[]>(++strLen); in ToUTF16String()
126 strLen = reinterpret_cast<char *>(str.get() + strLen) - reinterpret_cast<char *>(str.get()); in ToUTF16String()
[all …]
/ohos5.0/foundation/filemanagement/file_api/interfaces/kits/js/src/common/napi/
H A Dn_val.cpp63 auto [succ, path, strLen] = ToUTF8String(); in ToUTF8StringPath()
64 if (succ == false || std::strlen(path.get()) < strLen) { in ToUTF8StringPath()
67 return make_tuple(true, move(path), strLen); in ToUTF8StringPath()
72 size_t strLen = 0; in ToUTF8String() local
78 size_t bufLen = strLen + 1; in ToUTF8String()
80 status = napi_get_value_string_utf8(env_, val_, str.get(), bufLen, &strLen); in ToUTF8String()
81 return make_tuple(status == napi_ok, move(str), strLen); in ToUTF8String()
97 size_t strLen = 0; in ToUTF16String() local
103 auto str = make_unique<char16_t[]>(++strLen); in ToUTF16String()
109 strLen = reinterpret_cast<char *>(str.get() + strLen) - reinterpret_cast<char *>(str.get()); in ToUTF16String()
[all …]
/ohos5.0/foundation/distributedhardware/distributed_hardware_fwk/av_transport/common/src/
H A Dav_trans_log.cpp38 size_t strLen = value.length(); in GetAnonyString() local
39 if (strLen < INT32_MIN_ID_LENGTH) { in GetAnonyString()
43 if (strLen <= INT32_SHORT_ID_LENGTH) { in GetAnonyString()
46 res += value[strLen - 1]; in GetAnonyString()
50 res.append(value, strLen - INT32_PLAINTEXT_LENGTH, INT32_PLAINTEXT_LENGTH); in GetAnonyString()
/ohos5.0/foundation/distributedhardware/distributed_hardware_fwk/utils/src/
H A Danonymous_string.cpp42 size_t strLen = value.length(); in GetAnonyString() local
43 if (strLen < INT32_MIN_ID_LENGTH) { in GetAnonyString()
47 if (strLen <= INT32_SHORT_ID_LENGTH) { in GetAnonyString()
50 res += value[strLen - 1]; in GetAnonyString()
54 res.append(value, strLen - INT32_PLAINTEXT_LENGTH, INT32_PLAINTEXT_LENGTH); in GetAnonyString()
/ohos5.0/base/hiviewdfx/hilog/interfaces/js/kits/napi/src/common/napi/
H A Dn_val.cpp56 size_t strLen = 0; in ToUTF8String() local
57 napi_status status = napi_get_value_string_utf8(env_, val_, nullptr, -1, &strLen); in ToUTF8String()
62 size_t bufLen = strLen + 1; in ToUTF8String()
64 status = napi_get_value_string_utf8(env_, val_, str.get(), bufLen, &strLen); in ToUTF8String()
65 return make_tuple(status == napi_ok, move(str), strLen); in ToUTF8String()
71 size_t strLen = 0; in ToUTF16String() local
72 napi_status status = napi_get_value_string_utf16(env_, val_, nullptr, -1, &strLen); in ToUTF16String()
77 auto str = make_unique<char16_t[]>(++strLen); in ToUTF16String()
78 status = napi_get_value_string_utf16(env_, val_, str.get(), strLen, nullptr); in ToUTF16String()
83 strLen = reinterpret_cast<char *>(str.get() + strLen) - reinterpret_cast<char *>(str.get()); in ToUTF16String()
[all …]
/ohos5.0/base/startup/init/services/init/
H A Dinit_service_manager.c203 *strLen = strlen(fieldStr); in GetStringValue()
355 size_t strLen = 0; in ParseSocketFamily() local
370 size_t strLen = 0; in ParseSocketType() local
387 size_t strLen = 0; in ParseSocketProtocol() local
391 if (strncmp(stringValue, "default", strLen) == 0) { in ParseSocketProtocol()
435 size_t strLen = 0; in AddServiceSocket() local
463 stringValue = GetStringValue(json, "uid", &strLen); in AddServiceSocket()
467 stringValue = GetStringValue(json, "gid", &strLen); in AddServiceSocket()
868 size_t strLen = 0; in ParseOneServiceArgs() local
906 size_t strLen = 0; in GetServiceEnv() local
[all …]
/ohos5.0/base/security/device_security_level/baselib/utils/src/
H A Dutils_hexstring.c37 void DslmByteToHexString(const uint8_t *hex, uint32_t hexLen, uint8_t *str, uint32_t strLen) in DslmByteToHexString() argument
39 if ((hex == NULL) || (str == NULL) || (strLen < hexLen * BYTE_TO_HEX_OPER_LENGTH)) { in DslmByteToHexString()
49 int32_t DslmHexStringToByte(const char *str, uint32_t strLen, uint8_t *hex, uint32_t hexLen) in DslmHexStringToByte() argument
51 …if ((str == NULL) || (hex == NULL) || (strLen % BYTE_TO_HEX_OPER_LENGTH)) { /* even number or not … in DslmHexStringToByte()
54 uint32_t outLen = strLen / BYTE_TO_HEX_OPER_LENGTH; in DslmHexStringToByte()
/ohos5.0/foundation/deviceprofile/device_info_manager/old/common/src/
H A Ddevice_profile_utils.cpp78 size_t strLen = value.length(); in AnonymizeString() local
79 if (strLen < INT32_MIN_ID_LENGTH) { in AnonymizeString()
83 if (strLen <= INT32_SHORT_ID_LENGTH) { in AnonymizeString()
86 res += value[strLen - 1]; in AnonymizeString()
90 res.append(value, strLen - INT32_PLAINTEXT_LENGTH, INT32_PLAINTEXT_LENGTH); in AnonymizeString()
/ohos5.0/base/location/frameworks/js/napi/notification/src/
H A Dnotification_napi_convert_content.cpp155 size_t strLen = 0; in GetNotificationBasicContentDetailed() local
163 NAPI_CALL(env, napi_get_value_string_utf8(env, value, str, STR_MAX_SIZE - 1, &strLen)); in GetNotificationBasicContentDetailed()
177 NAPI_CALL(env, napi_get_value_string_utf8(env, value, str, STR_MAX_SIZE - 1, &strLen)); in GetNotificationBasicContentDetailed()
246 size_t strLen = 0; in GetNotificationLongTextContentDetailed() local
356 size_t strLen = 0; in GetNotificationPictureContentDetailed() local
524 size_t strLen = 0; in GetMessageUserByString() local
665 size_t strLen = 0; in GetNotificationConversationalContentTitle() local
784 size_t strLen = 0; in GetConversationalMessageBasicInfo() local
859 size_t strLen = 0; in GetConversationalMessageOtherInfo() local
910 size_t strLen = 0; in GetNotificationMultiLineContent() local
[all …]
/ohos5.0/foundation/multimedia/av_codec/test/moduletest/audio_decoder/InnerAPI/
H A DInnerFuzzTest.cpp121 int32_t strLen = rand() % 1000; variable
122 string randStr = getRandStr(strLen);
142 int strLen = 0; variable
147 strLen = rand() % 65536;
148 test_value = getRandStr(strLen);
350 int strLen = 0; variable
356 strLen = rand() % 65536;
357 test_key = getRandStr(strLen);
358 cout << "test key len is:" << strLen << endl;
359 strLen = rand() % 65536;
[all …]
/ohos5.0/foundation/distributedhardware/distributed_camera/common/src/utils/
H A Danonymous_string.cpp63 size_t strLen = value.length(); in GetAnonyString() local
64 if (strLen < INT32_MIN_ID_LENGTH) { in GetAnonyString()
68 if (strLen <= INT32_SHORT_ID_LENGTH) { in GetAnonyString()
71 res += value[strLen - 1]; in GetAnonyString()
75 res.append(value, strLen - INT32_PLAINTEXT_LENGTH, INT32_PLAINTEXT_LENGTH); in GetAnonyString()
/ohos5.0/base/security/crypto_framework/common/src/
H A Dhcf_string.c74 uint32_t strLen = strlen(str); in StringSetPointerWithLength() local
75 if (strLen < len) { in StringSetPointerWithLength()
135 uint32_t strLen = StringLength(self); in StringFind() local
136 if (strLen >= MAX_INT) { in StringFind()
141 while (p < strLen) { in StringFind()
/ohos5.0/foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/webgl/common/napi/
H A Dn_val.cpp119 size_t strLen = 0; in ToUTF8String() local
120 napi_status status = napi_get_value_string_utf8(env_, val_, nullptr, -1, &strLen); in ToUTF8String()
125 size_t bufLen = strLen + 1; in ToUTF8String()
127 status = napi_get_value_string_utf8(env_, val_, str.get(), bufLen, &strLen); in ToUTF8String()
128 return make_tuple(status == napi_ok, move(str), strLen); in ToUTF8String()
134 size_t strLen = 0; in ToUTF16String() local
135 napi_status status = napi_get_value_string_utf16(env_, val_, nullptr, -1, &strLen); in ToUTF16String()
140 auto str = make_unique<char16_t[]>(++strLen); in ToUTF16String()
141 status = napi_get_value_string_utf16(env_, val_, str.get(), strLen, nullptr); in ToUTF16String()
146 strLen = reinterpret_cast<char *>(str.get() + strLen) - reinterpret_cast<char *>(str.get()); in ToUTF16String()
[all …]
/ohos5.0/foundation/bundlemanager/bundle_framework/interfaces/kits/js/zip/napi/common/
H A Dnapi_value.cpp65 size_t strLen = 0; in ToUTF8String() local
66 napi_status status = napi_get_value_string_utf8(env_, val_, nullptr, -1, &strLen); in ToUTF8String()
71 size_t bufLen = strLen + 1; in ToUTF8String()
73 status = napi_get_value_string_utf8(env_, val_, str.get(), bufLen, &strLen); in ToUTF8String()
74 return make_tuple(status == napi_ok, move(str), strLen); in ToUTF8String()
90 size_t strLen = 0; in ToUTF16String() local
91 napi_status status = napi_get_value_string_utf16(env_, val_, nullptr, -1, &strLen); in ToUTF16String()
96 auto str = make_unique<char16_t[]>(++strLen); in ToUTF16String()
97 status = napi_get_value_string_utf16(env_, val_, str.get(), strLen, nullptr); in ToUTF16String()
102 strLen = reinterpret_cast<char *>(str.get() + strLen) - reinterpret_cast<char *>(str.get()); in ToUTF16String()
[all …]
/ohos5.0/foundation/multimedia/av_codec/test/moduletest/audio_encoder/InnerAPI/
H A DInnerFuzzTest.cpp120 int32_t strLen = rand() % 1000; variable
121 string randStr = getRandStr(strLen);
139 int strLen = 0; variable
144 strLen = rand() % 65536;
145 test_value = getRandStr(strLen);
357 int strLen = 0; variable
363 strLen = rand() % 65536;
364 test_key = getRandStr(strLen);
365 cout << "test key len is:" << strLen << endl;
366 strLen = rand() % 65536;
[all …]

1234567