/ohos5.0/foundation/systemabilitymgr/samgr_lite/samgr/adapter/posix/ |
H A D | lock_free_queue.c | 66 uint32 copyLen = (queue->totalSize - queue->write < queue->itemSize) ? in LFQUE_Push() local 68 if (memcpy_s(&queue->buffer[queue->write], copyLen, element, copyLen) != EOK) { in LFQUE_Push() 72 element += copyLen; in LFQUE_Push() 73 copyLen = queue->itemSize - copyLen; in LFQUE_Push() 74 if (copyLen > 0) { in LFQUE_Push() 75 if (memcpy_s(queue->buffer, copyLen, element, copyLen) != EOK) { in LFQUE_Push() 100 if (memcpy_s(element, copyLen, &queue->buffer[queue->read], copyLen) != EOK) { in LFQUE_Pop() 104 element += copyLen; in LFQUE_Pop() 105 copyLen = queue->itemSize - copyLen; in LFQUE_Pop() 106 if (copyLen > 0) { in LFQUE_Pop() [all …]
|
/ohos5.0/base/update/updater/services/flow_update/update_bin/ |
H A D | bin_process.cpp | 171 size_t copyLen = 0; in UnCompressDataProducer() local 174 copyLen = STASH_BUFFER_SIZE - stashDataSize_; in UnCompressDataProducer() 175 …if (memcpy_s(stashBuffer_.buffer + stashDataSize_, copyLen, buffer.buffer + writeSize, copyLen) !=… in UnCompressDataProducer() 183 writeSize += copyLen; in UnCompressDataProducer() 187 copyLen = size - writeSize; in UnCompressDataProducer() 188 …if (memcpy_s(stashBuffer_.buffer + stashDataSize_, copyLen, buffer.buffer + writeSize, copyLen) !=… in UnCompressDataProducer() 191 stashDataSize_ += copyLen; in UnCompressDataProducer() 193 …if (flowStream->Write(stashBuffer_, stashDataSize_, start - stashDataSize_ + copyLen) != USCRIPT_S… in UnCompressDataProducer()
|
/ohos5.0/base/update/updater/services/package/pkg_manager/ |
H A D | pkg_stream.cpp | 223 size_t copyLen = GetFileLength() - start; in Read() local 224 readLen = ((copyLen > needRead) ? needRead : copyLen); in Read() 229 … PKG_LOGE("Memcpy failed size:%zu, start:%zu copyLen:%zu %zu", needRead, start, copyLen, readLen); in Read() 248 size_t copyLen = memSize_ - start; in Write() local 249 if (copyLen < size) { in Write() 250 PKG_LOGE("Write fail copyLen %zu, %zu", copyLen, size); in Write()
|
/ohos5.0/foundation/distributedhardware/device_manager/interfaces/inner_kits/native_cpp/include/ |
H A D | dm_app_image_info.h | 78 …32_t SetThumbnailData(uint8_t *srcBuffer, int32_t srcBufferLen, int32_t copyIndex, int32_t copyLen) in SetThumbnailData() argument 80 if (srcBuffer == nullptr || srcBufferLen <= 0 || copyLen > srcBufferLen || copyIndex < 0) { in SetThumbnailData() 84 if ((copyIndex + copyLen) > appThumbnailLen_) { in SetThumbnailData() 93 static_cast<uint32_t>(copyLen)) != 0) { in SetThumbnailData()
|
/ohos5.0/base/hiviewdfx/faultloggerd/interfaces/innerkits/dump_catcher/ |
H A D | dfx_dump_catcher.cpp | 200 size_t copyLen; in ReportDumpCatcherStats() local 203 copyLen = std::min(sizeof(stat->targetProcess) - 1, processName.size()); in ReportDumpCatcherStats() 204 …if (memcpy_s(stat->targetProcess, sizeof(stat->targetProcess) - 1, processName.c_str(), copyLen) !… in ReportDumpCatcherStats() 210 copyLen = std::min(sizeof(stat->summary) - 1, msg.size()); in ReportDumpCatcherStats() 211 if (memcpy_s(stat->summary, sizeof(stat->summary) - 1, msg.c_str(), copyLen) != 0) { in ReportDumpCatcherStats() 219 copyLen = std::min(sizeof(stat->callerElf) - 1, strlen(info.dli_fname)); in ReportDumpCatcherStats() 220 if (memcpy_s(stat->callerElf, sizeof(stat->callerElf) - 1, info.dli_fname, copyLen) != 0) { in ReportDumpCatcherStats() 229 copyLen = std::min(sizeof(stat->callerProcess) - 1, cmdline.size()); in ReportDumpCatcherStats() 231 cmdline.c_str(), copyLen) != 0) { in ReportDumpCatcherStats()
|
/ohos5.0/base/hiviewdfx/hilog_lite/command/ |
H A D | hilog_command.c | 106 int copyLen = (len < DOMAIN_ID_LENGTH) ? len : DOMAIN_ID_LENGTH; in SetOutputDomain() local 108 …_hiviewConfig.logOutputModule + destStart, modSize - destStart, mod + sourceStart, copyLen) != 0) { in SetOutputDomain()
|
/ohos5.0/base/hiviewdfx/hiview/base/utility/ |
H A D | file_util.cpp | 321 ssize_t copyLen = sendfile(fdOut, fdIn, nullptr, totalLen - copyTotalLen); in CopyFileFast() local 322 if (copyLen <= 0) { in CopyFileFast() 325 copyTotalLen += static_cast<uint64_t>(copyLen); in CopyFileFast()
|
/ohos5.0/foundation/multimedia/av_codec/services/media_engine/plugins/source/http_source/utils/ |
H A D | media_cached_buffer.cpp | 248 size_t copyLen = static_cast<size_t>(chunkInfoTmp->dataLength - diff); in WriteInPlace() local 249 copyLen = std::min(copyLen, writeSize); in WriteInPlace() 250 errno_t res = memcpy_s(chunkInfoTmp->data + diff, copyLen, src, copyLen); in WriteInPlace() 252 IncreaseStep(src, offset, writeSizeTmp, copyLen); in WriteInPlace() 264 auto copyLen = std::min(chunkInfoTmp->dataLength, (uint32_t)(writeSize - writeSizeTmp)); in WriteInPlace() local 265 errno_t res = memcpy_s(chunkInfoTmp->data, copyLen, src, copyLen); in WriteInPlace() 267 IncreaseStep(src, offset, writeSizeTmp, copyLen); in WriteInPlace()
|
/ohos5.0/base/startup/appspawn/modules/common/ |
H A D | appspawn_common.c | 75 size_t copyLen = len; in SetProcessName() local 78 copyLen = MAX_LEN_SHORT_NAME - 1; in SetProcessName() 79 pos += (len - copyLen); in SetProcessName() 81 bool isRet = strncpy_s(shortName, MAX_LEN_SHORT_NAME, pos, copyLen) != EOK; in SetProcessName()
|
/ohos5.0/base/startup/appspawn/modules/sandbox/ |
H A D | sandbox_manager.c | 560 size_t copyLen = permissionNode->section.gidCount; in AppendPermissionGid() local 564 copyLen = APP_MAX_GIDS - dacInfo->gidCount; in AppendPermissionGid() 566 int ret = memcpy_s(&dacInfo->gidTable[dacInfo->gidCount], sizeof(gid_t) * copyLen, in AppendPermissionGid() 567 permissionNode->section.gidTable, sizeof(gid_t) * copyLen); in AppendPermissionGid() 574 dacInfo->gidCount += copyLen; in AppendPermissionGid()
|
/ohos5.0/foundation/communication/dsoftbus/components/nstackx/fillp/src/app_lib/src/ |
H A D | socket_app.c | 466 FILLP_UINT32 copyLen; in SockSendmsgDataToBufCache() local 500 copyLen = (itemRemainLen > iovRemainLen) ? iovRemainLen : itemRemainLen; in SockSendmsgDataToBufCache() 501 if (memcpy_s(itemIter, itemRemainLen, iovIter, copyLen) != EOK) { in SockSendmsgDataToBufCache() 506 …DMSG_DATA_MOD_LEN(iovIter, iovRemainLen, itemIter, itemRemainLen, sendLen, item->dataLen, copyLen); in SockSendmsgDataToBufCache() 678 FILLP_UINT32 copyLen; in SockRecvmsgDataFromBufCache() local 706 copyLen = (itemRemainLen > iovRemainLen) ? iovRemainLen : itemRemainLen; in SockRecvmsgDataFromBufCache() 707 ret = memcpy_s(iovIter, iovRemainLen, itemIter, copyLen); in SockRecvmsgDataFromBufCache() 713 …ENDMSG_DATA_MOD_LEN(iovIter, iovRemainLen, itemIter, itemRemainLen, rcvLen, sock->offset, copyLen); in SockRecvmsgDataFromBufCache() 714 item->dataLen -= (FILLP_UINT16)copyLen; in SockRecvmsgDataFromBufCache()
|
/ohos5.0/drivers/peripheral/audio/supportlibs/alsa_adapter/src/ |
H A D | alsa_snd_render.c | 630 uint32_t copyLen = (looper < (loopTimes - 1)) ? MIN_PERIOD_SIZE : lastBuffSize; in RenderWriteiMmap() local 631 snd_pcm_uframes_t frames = (snd_pcm_uframes_t)(copyLen / frameSize); in RenderWriteiMmap() 648 mmapBufDesc->offset += copyLen; in RenderWriteiMmap()
|
/ohos5.0/foundation/bundlemanager/bundle_framework_lite/frameworks/bundle_lite/src/ |
H A D | bundle_manager.cpp | 876 int32_t copyLen = strlen(resultOfGetSysCap.systemCap.systemCapName[index].name); in GetSystemAvailableCapabilities() local 878 resultOfGetSysCap.systemCap.systemCapName[index].name, copyLen); in GetSystemAvailableCapabilities()
|