/base/sensors/sensor/vibration_convert/core/algorithm/frequency_estimation/src/ |
H A D | frequency_estimation.cpp | 44 return (sumValue / data.size()); in Mean() 58 std::vector<double> pitch(hzTrims.size(), 0.0); in FreqPostProcess() 59 for (size_t i = 0; i < hzTrims.size(); ++i) { in FreqPostProcess() 68 if (!freqNorm.empty() && (freqNorm.size() + 1) == rmseIntensityNorm.size()) { in FreqPostProcess() 79 size_t dataSize = data.size(); in GetZeroCrossingRate() 91 size_t curFrameSize = oneFrmData.size(); in GetZeroCrossingRate()
|
/base/security/huks/test/unittest/huks_standard_test/crypto_engine_test/src/ |
H A D | hks_crypto_hal_sm3_cipher.cpp | 50 .size = strlen("The factor1"), in RunTestCase() 88 uint32_t dataLen = hexData.size() / HKS_COUNT_OF_HALF; in HWTEST_F() 90 HksBlob message = { .size = dataLen, .data = (uint8_t *)HksMalloc(dataLen) }; in HWTEST_F() 110 uint32_t dataLen = hexData.size() / HKS_COUNT_OF_HALF; in HWTEST_F() 112 HksBlob message = { .size = dataLen, .data = (uint8_t *)HksMalloc(dataLen) }; in HWTEST_F() 132 uint32_t dataLen = hexData.size() / HKS_COUNT_OF_HALF; in HWTEST_F() 134 HksBlob message = { .size = dataLen, .data = (uint8_t *)HksMalloc(dataLen) }; in HWTEST_F()
|
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/ |
H A D | hks_agree_test_common.cpp | 40 .size = AGREE_TEST_IV_SIZE, \ 80 struct HksBlob plaindata = { .size = (uint32_t)strlen(plainTest), .data = (uint8_t *)plainTest }; in TestAgreedKeyEncryptDecrypt() 83 struct HksBlob cipherData = { .size = cipherMaxSize, .data = (uint8_t *)cipherBuffer }; in TestAgreedKeyEncryptDecrypt() 89 struct HksBlob decrypedData = { .size = cipherMaxSize, .data = (uint8_t *)decrypedBuffer }; in TestAgreedKeyEncryptDecrypt() 94 if (decrypedData.size != plaindata.size || in TestAgreedKeyEncryptDecrypt() 95 HksMemCmp(decrypedData.data, plaindata.data, plaindata.size) != HKS_SUCCESS) { in TestAgreedKeyEncryptDecrypt()
|
/base/telephony/ril_adapter/services/vendor/src/ |
H A D | vendor_channel.c | 90 ssize_t size; in ReadResponse() local 101 size = read(atFd, processed, (MAX_RESPONSE_LEN - (processed - &g_buffer[0]))); in ReadResponse() 102 } while (size < 0 && errno == EINTR); in ReadResponse() 103 if (size > 0) { in ReadResponse() 104 processed[size] = '\0'; in ReadResponse() 107 processed += size; in ReadResponse() 108 } else if (size == 0) { in ReadResponse()
|
/base/update/updater/services/flashd/ |
H A D | partition.cpp | 72 uint64_t size = GetBlockDeviceSize(fd);
in DoErasePartition() local 73 uint64_t range[2] = { 0, size };
in DoErasePartition() 79 range[1] = size;
in DoErasePartition() 86 if (!Updater::Utils::WriteFully(fd, buffer.data(), buffer.size())) {
in DoErasePartition() 136 uint64_t size = 0;
in GetBlockDeviceSize() local 137 return (ioctl(fd, BLKGETSIZE64, &size) == 0) ? size : 0;
in GetBlockDeviceSize()
|
/base/usb/usb_manager/test/fuzztest/usbmgrex_fuzzer/ |
H A D | usbmgrex_fuzzer.cpp | 127 bool DoSomethingInterestingWithMyAPI(const uint8_t *rawData, size_t size)
in DoSomethingInterestingWithMyAPI() argument 140 size = size - OFFSET;
in DoSomethingInterestingWithMyAPI() 144 data.WriteBuffer(rawData, size);
in DoSomethingInterestingWithMyAPI() 154 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
in LLVMFuzzerTestOneInput() argument 156 if (size < OHOS::THRESHOLD) {
in LLVMFuzzerTestOneInput() 161 OHOS::DoSomethingInterestingWithMyAPI(data, size);
in LLVMFuzzerTestOneInput()
|
/drivers/external_device_manager/frameworks/ddk/base/ |
H A D | ddk_api.cpp | 32 DDK_RetCode OH_DDK_CreateAshmem(const uint8_t *name, uint32_t size, DDK_Ashmem **ashmem) in OH_DDK_CreateAshmem() argument 39 if (size == 0) { in OH_DDK_CreateAshmem() 40 EDM_LOGE(MODULE_BASE_DDK, "invalid buffer size!, size = %{public}d", size); in OH_DDK_CreateAshmem() 49 OHOS::sptr<OHOS::Ashmem> shareMemory = OHOS::Ashmem::CreateAshmem(reinterpret_cast<const char*>(name), size); in OH_DDK_CreateAshmem() 56 DDK_Ashmem *ddkAshmem = new DDK_Ashmem({fd, nullptr, size, 0, size, 0}); in OH_DDK_CreateAshmem() 109 reinterpret_cast<const uint8_t *>(g_shareMemoryMap[ashmem->ashmemFd]->ReadFromAshmem(ashmem->size, 0)); in OH_DDK_MapAshmem()
|
/drivers/peripheral/audio/effect/test/fuzztest/effectcontrol_fuzzer/ |
H A D | effectcontrol_fuzzer.cpp | 50 void EffectControlFucSwitch(struct IEffectControl *&controller, uint32_t cmd, const uint8_t *&rawData, size_t size) in EffectControlFucSwitch() argument 63 reinterpret_cast<int8_t *>(data), size, output, &replyLen); in EffectControlFucSwitch() 81 bool DoSomethingInterestingWithMyAPI(const uint8_t *rawData, size_t size) in DoSomethingInterestingWithMyAPI() argument 112 EffectControlFucSwitch(controller, cmd, rawData, size); in DoSomethingInterestingWithMyAPI() 133 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) in LLVMFuzzerTestOneInput() argument 135 if (size < OHOS::Audio::THRESHOLD) { in LLVMFuzzerTestOneInput() 138 OHOS::Audio::DoSomethingInterestingWithMyAPI(data, size); in LLVMFuzzerTestOneInput()
|
/drivers/peripheral/camera/test/fuzztest/defferred_delivery_image/ |
H A D | defferred_delivery_image_fuzzer.cpp | 64 int imagesCount = cameraTest_->pendingImageIds_.size(); in ProcessImageApi() 75 int imagesCount = cameraTest_->pendingImageIds_.size(); in RemoveImageApi() 109 bool DoSomethingInterestingWithMyApi(const uint8_t *rawData, size_t size) in DoSomethingInterestingWithMyApi() argument 111 (void)size; in DoSomethingInterestingWithMyApi() 137 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) in LLVMFuzzerTestOneInput() argument 139 if (size < THRESHOLD) { in LLVMFuzzerTestOneInput() 143 DoSomethingInterestingWithMyApi(data, size); in LLVMFuzzerTestOneInput()
|
/drivers/peripheral/codec/image/hdi_service/src/ |
H A D | codec_image_service.cpp | 79 int32_t CodecImageService::AllocateInBuffer(CodecImageBuffer& inBuffer, uint32_t size, CodecImageRole role)
in AllocateInBuffer() argument 82 CODEC_LOGD("servcie impl, size [%{public}d]", size);
in AllocateInBuffer() 83 CHECK_AND_RETURN_RET_LOG(size != 0, HDF_ERR_INVALID_PARAM, "buffer size is 0");
in AllocateInBuffer() 84 CHECK_AND_RETURN_RET_LOG(size <= CODEC_IMAGE_MAX_BUFFER_SIZE, HDF_ERR_INVALID_PARAM, "buffer size is too large");
in AllocateInBuffer() 86 inBuffer.size = size;
in AllocateInBuffer() 89 return jpegImpl_->AllocateJpegInBuffer(inBuffer, size);
in AllocateInBuffer() [all...] |
/drivers/peripheral/wlan/test/fuzztest/ap_fuzzer/ |
H A D | ap_fuzzer.cpp | 93 bool DoSomethingInterestingWithMyAPI(const uint8_t *rawData, size_t size) in DoSomethingInterestingWithMyAPI() argument 98 if (rawData == nullptr || size == 0) { in DoSomethingInterestingWithMyAPI() 107 uint32_t dataSize = size - OFFSET; in DoSomethingInterestingWithMyAPI() 120 if (PreProcessRawData(rawData, size, tmpRawData, dataSize + 1) != true) { in DoSomethingInterestingWithMyAPI() 149 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) in LLVMFuzzerTestOneInput() argument 151 if (size < OHOS::WIFI::THRESHOLD) { in LLVMFuzzerTestOneInput() 156 OHOS::WIFI::DoSomethingInterestingWithMyAPI(data, size); in LLVMFuzzerTestOneInput()
|
/drivers/peripheral/wlan/test/fuzztest/sta_fuzzer/ |
H A D | sta_fuzzer.cpp | 45 HDF_LOGE("%{public}s: get data size failed!", __FUNCTION__); in FuzzSetScanningMacAddress() 84 bool DoSomethingInterestingWithMyAPI(const uint8_t *rawData, size_t size) in DoSomethingInterestingWithMyAPI() argument 89 if (rawData == nullptr || size == 0) { in DoSomethingInterestingWithMyAPI() 99 uint32_t dataSize = size - OFFSET; in DoSomethingInterestingWithMyAPI() 112 if (PreProcessRawData(rawData, size, tmpRawData, dataSize + 1) != true) { in DoSomethingInterestingWithMyAPI() 141 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) in LLVMFuzzerTestOneInput() argument 143 if (size < OHOS::WIFI::THRESHOLD) { in LLVMFuzzerTestOneInput() 148 OHOS::WIFI::DoSomethingInterestingWithMyAPI(data, size); in LLVMFuzzerTestOneInput()
|
/foundation/ability/ability_runtime/services/uripermmgr/src/ |
H A D | file_permission_manager.cpp | 68 "call, uri size:%{public}zu", uriVec.size()); in CheckUriPersistentPermission() 69 std::vector<bool> resultCodes(uriVec.size(), false); in CheckUriPersistentPermission() 72 for (size_t i = 0; i < uriVec.size(); i++) { in CheckUriPersistentPermission() 81 for (size_t i = 0; i < uriVec.size(); i++) { in CheckUriPersistentPermission() 95 if (ret == SANDBOX_MANAGER_OK && persistResultCodes.size() == resultIndex.size()) { in CheckUriPersistentPermission() 96 for (size_t i = 0; i < persistResultCodes.size(); i++) { in CheckUriPersistentPermission()
|
/foundation/CastEngine/castengine_wifi_display/services/interaction/ipc_codec/ |
H A D | ipc_codec.h | 54 int32_t size = (int32_t)vec.size(); in IpcEncodeBindAttr() local 55 IpcEncodeBindAttr(pIpcMsg, size); in IpcEncodeBindAttr() 92 int32_t size; in IpcDecodeBindAttr() local 93 IpcDecodeBindAttr(pIpcMsg, size); in IpcDecodeBindAttr() 94 vec.resize(size); in IpcDecodeBindAttr() 96 for (int i = 0; i < size; i++) { in IpcDecodeBindAttr()
|
/foundation/ability/ability_base/interfaces/inner_api/base/src/ |
H A D | zchar_wrapper.cpp | 84 int size) in WriteUTF8Bytes() 87 dst += size; in WriteUTF8Bytes() 88 switch (size) { in WriteUTF8Bytes() 106 *(--dst) = (uc | FIRST_BYTE_MARK[size]); in WriteUTF8Bytes() 141 int &size) in GetCharInternal() 144 size = 1; in GetCharInternal() 158 size = static_cast<int>(num2Read); in GetCharInternal() 82 WriteUTF8Bytes(char *dst, zchar c, int size) WriteUTF8Bytes() argument 140 GetCharInternal(const unsigned char *cur, int &size) GetCharInternal() argument
|
/foundation/ability/ability_runtime/frameworks/native/ability/native/ |
H A D | data_uri_utils.cpp | 67 string lastPath = pathVector[pathVector.size() - 1]; in AttachId() 84 uriString.replace(lastPathPos + 1, tempLastPath.size() - 1, newLastPath.c_str()); in AttachId() 105 string lastPath = pathVector[pathVector.size() - 1]; in GetId() 160 string lastPath = pathVector[pathVector.size() - 1]; in IsAttachedId() 185 if (updateLastPath.size() > 0) { in UriUpateLastPath() 200 string lastPath = pathVector[pathVector.size() - 1]; in UriUpateLastPath() 213 uriString.replace(lastPathPos, lastPath.size() + 1, strUpdateLastPath); in UriUpateLastPath()
|
/foundation/barrierfree/accessibility/common/interface/test/fuzztest/accessibilityelementoperatorstub_fuzzer/ |
H A D | accessibilityelementoperatorstub_fuzzer.cpp | 56 size_t GetData(T &object, const uint8_t *databuffer, size_t size) in GetData() argument 59 if (objectSize > size) { in GetData() 65 bool EleOperatorOnRemoteRequestFuzzTest(const uint8_t* databuffer, size_t size) in EleOperatorOnRemoteRequestFuzzTest() argument 67 if (databuffer == nullptr || size < DATA_MIN_SIZE) { in EleOperatorOnRemoteRequestFuzzTest() 77 GetData<uint32_t>(code, &databuffer[position], size - position); in EleOperatorOnRemoteRequestFuzzTest() 87 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) in LLVMFuzzerTestOneInput() argument 90 OHOS::Accessibility::EleOperatorOnRemoteRequestFuzzTest(data, size); in LLVMFuzzerTestOneInput()
|
/foundation/bundlemanager/bundle_framework/interfaces/kits/cj/src/ |
H A D | bundle_manager_ffi.cpp | 34 std::vector<std::string> CharPtrToVector(char** charPtr, int32_t size) in CharPtrToVector() argument 37 for (int32_t i = 0; i < size; i++) { in CharPtrToVector() 47 char** result = new char* [vec.size()]; in VectorToCArrString() 53 for (size_t i = 0; i < vec.size(); i++) { in VectorToCArrString() 65 if (temp != vec.size()) { in VectorToCArrString() 73 return {result, vec.size()}; in VectorToCArrString() 94 std::vector<std::string> abcPaths = CharPtrToVector(cAbcPaths.head, cAbcPaths.size); in FfiOHOSVerifyAbc()
|
/foundation/graphic/graphic_3d/lume/metaobject/test/src/ |
H A D | serialisation_utils.cpp | 42 size_t read = std::min<size_t>(count, data_.size() - pos_); in Read() 48 if (data_.size() < pos_ + count) { in Write() 56 return data_.size(); in GetLength() 60 bool ret = offset < data_.size(); in Seek() 114 f->Read(vec.data(), vec.size()); in LoadFile() 126 return BASE_NS::string(BASE_NS::string_view(data_.Data().data(), data_.Data().size())); in Get() 133 f->Write(vec.data(), vec.size()); in WriteToFile()
|
/foundation/multimedia/audio_framework/test/fuzztest/audiohdiadapterdevicemanager_fuzzer/ |
H A D | audio_hdi_adapter_devicemanager_fuzzer.cpp | 36 void AudioDeviceManagerFactoryFuzzTest(const uint8_t *rawData, size_t size) in AudioDeviceManagerFactoryFuzzTest() argument 38 if (rawData == nullptr || size < LIMITSIZE) { in AudioDeviceManagerFactoryFuzzTest() 49 void AudioDeviceManagerImlFuzzTest(const uint8_t *rawData, size_t size) in AudioDeviceManagerImlFuzzTest() argument 51 if (rawData == nullptr || size < LIMITSIZE) { in AudioDeviceManagerImlFuzzTest() 101 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) in LLVMFuzzerTestOneInput() argument 104 OHOS::AudioStandard::AudioDeviceManagerFactoryFuzzTest(data, size); in LLVMFuzzerTestOneInput() 105 OHOS::AudioStandard::AudioDeviceManagerImlFuzzTest(data, size); in LLVMFuzzerTestOneInput()
|
/foundation/graphic/graphic_2d/rosen/test/2d_graphics/fuzztest/draw/colorfilter_fuzzer/ |
H A D | color_filter_fuzzer.cpp | 31 bool ColorFilterFuzzTest001(const uint8_t* data, size_t size) in ColorFilterFuzzTest001() argument 38 g_size = size; in ColorFilterFuzzTest001() 56 bool ColorFilterFuzzTest002(const uint8_t* data, size_t size) in ColorFilterFuzzTest002() argument 63 g_size = size; in ColorFilterFuzzTest002() 101 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) in LLVMFuzzerTestOneInput() argument 104 OHOS::Rosen::Drawing::ColorFilterFuzzTest001(data, size); in LLVMFuzzerTestOneInput() 105 OHOS::Rosen::Drawing::ColorFilterFuzzTest002(data, size); in LLVMFuzzerTestOneInput()
|
/foundation/graphic/graphic_2d/rosen/test/2d_graphics/fuzztest/utils/region_fuzzer/ |
H A D | region_fuzzer.cpp | 33 bool RegionFuzzTest001(const uint8_t* data, size_t size) in RegionFuzzTest001() argument 41 g_size = size; in RegionFuzzTest001() 81 bool RegionFuzzTest002(const uint8_t* data, size_t size) in RegionFuzzTest002() argument 89 g_size = size; in RegionFuzzTest002() 114 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) in LLVMFuzzerTestOneInput() argument 117 OHOS::Rosen::Drawing::RegionFuzzTest001(data, size); in LLVMFuzzerTestOneInput() 118 OHOS::Rosen::Drawing::RegionFuzzTest002(data, size); in LLVMFuzzerTestOneInput()
|
/foundation/multimedia/av_codec/services/media_engine/modules/demuxer/ |
H A D | stream_demuxer.h | 57 Status PullData(int32_t streamID, uint64_t offset, size_t size, std::shared_ptr<Plugins::Buffer>& data); 58 Status PullDataWithoutCache(int32_t streamID, uint64_t offset, size_t size, std::shared_ptr<Buffer>& bufferPtr); 59 Status PullDataWithCache(int32_t streamID, uint64_t offset, size_t size, std::shared_ptr<Buffer>& bufferPtr); 60 Status GetPeekRange(int32_t streamID, uint64_t offset, size_t size, std::shared_ptr<Buffer>& bufferPtr); 61 Status ReadHeaderData(int32_t streamID, uint64_t offset, size_t size, std::shared_ptr<Buffer>& bufferPtr); 62 Status ReadFrameData(int32_t streamID, uint64_t offset, size_t size, std::shared_ptr<Buffer>& bufferPtr); 63 Status ReadRetry(int32_t streamID, uint64_t offset, size_t size, std::shared_ptr<Plugins::Buffer>& data);
|
/foundation/graphic/graphic_surface/utils/hebc_white_list/ |
H A D | hebc_white_list.cpp | 71 for (unsigned int i = 0; i < appNameJson.size(); i++) { 80 size_t size = 0; variable 83 buffer = ReadFile(filePath, size, MAX_FILE_SIZE); 102 std::unique_ptr<char[]> HebcWhiteList::ReadFile(std::string const &file, size_t &size, size_t maxSize) noexcept 123 size = tellg; 124 auto buffer = std::make_unique<char[]>(size); 126 ifs.read(buffer.get(), size);
|
/foundation/graphic/graphic_2d/rosen/modules/render_service_base/src/memory/ |
H A D | rs_memory_snapshot.cpp | 26 void MemorySnapshot::AddCpuMemory(const pid_t pid, const size_t size) in AddCpuMemory() argument 33 mInfo.cpuMemory += size; in AddCpuMemory() 34 totalMemory_ += size; in AddCpuMemory() 35 if (mInfo.cpuMemory > singleCpuMemoryLimit_ && mInfo.cpuMemory - size < singleCpuMemoryLimit_) { in AddCpuMemory() 45 void MemorySnapshot::RemoveCpuMemory(const pid_t pid, const size_t size) in RemoveCpuMemory() argument 50 it->second.cpuMemory -= size; in RemoveCpuMemory() 51 totalMemory_ -= size; in RemoveCpuMemory()
|