Home
last modified time | relevance | path

Searched refs:fileLength (Results 1 – 25 of 31) sorted by relevance

12

/ohos5.0/foundation/ai/intelligent_voice_framework/llt/hdt/depend_libs/src/
H A Dfile_ex.cpp45 int fileLength = file.tellg(); in LoadStringFromFile() local
46 if (fileLength > MAX_FILE_LENGTH) { in LoadStringFromFile()
98 if (fileLength > MAX_FILE_LENGTH) { in LoadStringFromFd()
104 if (fileLength < 0) { in LoadStringFromFd()
108 if (fileLength == 0) { in LoadStringFromFd()
112 content.resize(fileLength); in LoadStringFromFd()
120 if (len != fileLength) { in LoadStringFromFd()
227 if (fileLength > MAX_FILE_LENGTH) { in LoadBufferFromFile()
233 if (fileLength < 0) { in LoadBufferFromFile()
237 if (fileLength == 0) { in LoadBufferFromFile()
[all …]
/ohos5.0/commonlibrary/c_utils/base/src/
H A Dfile_ex.cpp120 if (fileLength > MAX_FILE_LENGTH) { in LoadStringFromFile()
172 if (fileLength > MAX_FILE_LENGTH) { in LoadStringFromFd()
178 if (fileLength < 0) { in LoadStringFromFd()
182 if (fileLength == 0) { in LoadStringFromFd()
186 content.resize(fileLength); in LoadStringFromFd()
194 if (len != fileLength) { in LoadStringFromFd()
305 if (fileLength > MAX_FILE_LENGTH) { in LoadBufferFromFile()
311 if (fileLength < 0) { in LoadBufferFromFile()
315 if (fileLength == 0) { in LoadBufferFromFile()
326 content.resize(fileLength); in LoadBufferFromFile()
[all …]
/ohos5.0/base/security/appverify/interfaces/innerkits/appverify/src/common/
H A Drandom_access_file.cpp35 : fd(FILE_OPEN_FAIL_ERROR_NUM), fileLength(0) in RandomAccessFile()
58 fileLength = lseek(fd, 0, SEEK_END); in Init()
59 if (fileLength < 0) { in Init()
60 HAPVERIFY_LOG_ERROR("getting fileLength failed: %{public}lld", fileLength); in Init()
84 fileLength = lseek(fd, 0, SEEK_END); in InitWithFd()
85 if (fileLength < 0) { in InitWithFd()
86 HAPVERIFY_LOG_ERROR("getting fileLength failed: %{public}lld", fileLength); in InitWithFd()
95 return fileLength; in GetLength()
118 if (offset < 0 || offset > fileLength - bufCapacity) { in DoMMap()
/ohos5.0/foundation/multimedia/image_framework/frameworks/innerkitsimpl/test/unittest/plugin_test/
H A Dplugin_libjpeg_test.cpp921 unsigned long fileLength = 100; variable
952 unsigned long fileLength = 100; variable
976 unsigned long fileLength = 100; variable
1000 unsigned long fileLength = 100; variable
1024 unsigned long fileLength = 100; variable
1048 unsigned long fileLength = 100; variable
1077 unsigned long fileLength = 100; variable
1104 unsigned long fileLength = 100; variable
1128 unsigned long fileLength = 100; variable
1152 unsigned long fileLength = 100; variable
[all …]
/ohos5.0/foundation/bundlemanager/distributed_bundle_framework/services/dbms/src/
H A Dimage_compress.cpp81 ImageType ImageCompress::GetImageType(const std::unique_ptr<uint8_t[]> &fileData, size_t fileLength) in GetImageType() argument
83 if (fileLength < FORMAT_LENGTH) { in GetImageType()
99 size_t fileLength, std::string &imageType) in GetImageTypeString() argument
101 ImageType type = GetImageType(fileData, fileLength); in GetImageTypeString()
111 std::unique_ptr<uint8_t[]> &fileContent, int64_t &fileLength) in GetImageFileInfo() argument
126 fileLength = ftell(file); in GetImageFileInfo()
128 fileContent = std::make_unique<uint8_t[]>(fileLength); in GetImageFileInfo()
129 if (!fread(fileContent.get(), sizeof(uint8_t), fileLength, file)) { in GetImageFileInfo()
H A Ddistributed_bms.cpp449 bool DistributedBms::GetMediaBase64(std::unique_ptr<uint8_t[]> &data, int64_t fileLength, in GetMediaBase64() argument
452 std::unique_ptr<char[]> base64Data = EncodeBase64(data, fileLength); in GetMediaBase64()
/ohos5.0/base/request/request/frameworks/js/napi/src/upload/
H A Dobtain_file.cpp62 int32_t fileLength = 0; in GetDataAbilityFile() local
80 fileLength = ftell(filePtr); in GetDataAbilityFile()
81 if (fileLength == -1) { in GetDataAbilityFile()
90 fileSize = static_cast<uint32_t>(fileLength); in GetDataAbilityFile()
139 int32_t fileLength = ftell(filePtr); in GetInternalFile() local
143 fileSize = fileLength; in GetInternalFile()
/ohos5.0/foundation/bundlemanager/distributed_bundle_framework/services/dbms/include/
H A Dimage_compress.h37 ImageType GetImageType(const std::unique_ptr<uint8_t[]> &fileData, size_t fileLength);
38 …bool GetImageTypeString(const std::unique_ptr<uint8_t[]> &fileData, size_t fileLength, std::string…
39 …FileInfo(const std::string &srcFile, std::unique_ptr<uint8_t[]> &fileContent, int64_t &fileLength);
H A Ddistributed_bms.h151 bool GetMediaBase64(std::unique_ptr<uint8_t[]> &data, int64_t fileLength,
/ohos5.0/foundation/bundlemanager/bundle_framework/services/bundlemgr/src/
H A Dzip_file.cpp140 …size_t fileLength = (directoryEntry.nameSize >= MAX_FILE_PATH) ? (MAX_FILE_PATH - 1) : directoryEn… in ParseAllEntries() local
141 if (fread(&(fileName[0]), fileLength, FILE_READ_COUNT, file_) != FILE_READ_COUNT) { in ParseAllEntries()
146 fileName.resize(fileLength); in ParseAllEntries()
195 int64_t fileLength = ftell(tmpFile); in Open() local
196 if (fileLength == -1) { in Open()
201 fileLength_ = static_cast<ZipPos>(fileLength); in Open()
370 …size_t fileLength = (localHeader.nameSize >= MAX_FILE_PATH) ? (MAX_FILE_PATH - 1) : localHeader.na… in CheckCoherencyLocalHeader() local
371 if (fileLength != zipEntry.fileName.length()) { in CheckCoherencyLocalHeader()
375 if (fread(&(fileName[0]), fileLength, FILE_READ_COUNT, file_) != FILE_READ_COUNT) { in CheckCoherencyLocalHeader()
379 fileName.resize(fileLength); in CheckCoherencyLocalHeader()
/ohos5.0/foundation/bundlemanager/distributed_bundle_framework/services/dbms/test/unittest/dbms_services_kit_test/
H A Ddbms_services_kit_test.cpp865 constexpr size_t fileLength = 7; variable
866 ImageType res = imageCompress->GetImageType(fileData, fileLength);
884 constexpr size_t fileLength = 7; variable
904 int64_t fileLength; variable
907 HAP_FILE_PATH, fileContent, fileLength);
1386 constexpr size_t fileLength = 64; variable
1408 constexpr size_t fileLength = 64; variable
1429 constexpr size_t fileLength = 64; variable
1452 constexpr size_t fileLength = 64; variable
1475 int64_t fileLength; variable
[all …]
/ohos5.0/foundation/bundlemanager/bundle_framework_lite/services/bundlemgr_lite/src/
H A Dzip_file.cpp143 size_t fileLength = in ParseAllEntries() local
145 if (fread(&(fileName[0]), fileLength, FILE_READ_COUNT, file_) != FILE_READ_COUNT) { in ParseAllEntries()
151 fileName.resize(fileLength); in ParseAllEntries()
205 ZipPos fileLength = ftell(tmpFile); in Open() local
207 fileLength_ = fileLength; in Open()
354 …size_t fileLength = (localHeader.nameSize >= MAX_FILE_NAME) ? (MAX_FILE_NAME - 1) : localHeader.na… in CheckCoherencyLocalHeader() local
355 if (fileLength != zipEntry.fileName.length()) { in CheckCoherencyLocalHeader()
359 if (fread(&(fileName[0]), fileLength, FILE_READ_COUNT, file_) != FILE_READ_COUNT) { in CheckCoherencyLocalHeader()
363 fileName.resize(fileLength); in CheckCoherencyLocalHeader()
/ohos5.0/base/update/updater/test/fuzztest/package_fuzzer/
H A Dpkg_fuzz_test.h101 size_t fileLength = stream->GetFileLength(); in BuildFileDigest() local
102 if (fileLength <= 0 || fileLength > SIZE_MAX) { in BuildFileDigest()
103 PKG_LOGE("Invalid file len %zu to load %s", fileLength, stream->GetFileName().c_str()); in BuildFileDigest()
122 while (offset < fileLength) { in BuildFileDigest()
/ohos5.0/foundation/multimedia/image_framework/plugins/common/libs/image/libjpegplugin/src/
H A Dexif_info.cpp597 fileLength = GetFileSize(*file); in GetFileInfoByPath()
598 if (fileLength == 0 || fileLength > MAX_FILE_SIZE) { in GetFileInfoByPath()
611 if (fread(*fileBuf, fileLength, 1, *file) != 1) { in GetFileInfoByPath()
628 unsigned long fileLength; in ModifyExifData() local
684 fileLength = GetFileSize(*file); in GetFileInfoByFd()
685 if (fileLength == 0 || fileLength > MAX_FILE_SIZE) { in GetFileInfoByFd()
700 if (fread(*fileBuf, fileLength, 1, *file) != 1) { in GetFileInfoByFd()
718 unsigned long fileLength; in ModifyExifData() local
1506 unsigned long fileLength = GetFileSize(fp); in UpdateCacheExifData() local
1507 if (fileLength == 0 || fileLength > MAX_FILE_SIZE) { in UpdateCacheExifData()
[all …]
/ohos5.0/drivers/peripheral/power/interfaces/hdi_service/src/
H A Dpower_interface_impl.cpp376 const int32_t fileLength = lseek(fd, 0, SEEK_END); in LoadStringFd() local
377 if (fileLength > MAX_FILE_LENGTH || fileLength <= 0) { in LoadStringFd()
378 HDF_LOGW("invalid file length(%{public}d)!", fileLength); in LoadStringFd()
386 content.resize(fileLength); in LoadStringFd()
387 const int32_t len = static_cast<int32_t>(read(fd, content.data(), fileLength)); in LoadStringFd()
389 …LOGW("the length read from file is failed, len: %{public}d, fileLen: %{public}d", len, fileLength); in LoadStringFd()
/ohos5.0/base/hiviewdfx/faultloggerd/common/dfxutil/
H A Dfile_util.h38 const long fileLength = file.tellg(); in LoadStringFromFile() local
39 if (fileLength > MAX_FILE_LENGTH) { in LoadStringFromFile()
/ohos5.0/base/security/appverify/interfaces/innerkits/appverify/src/ticket/
H A Dticket_verify.cpp223 long long fileLength = ticketFile.GetLength(); in VerifyTicket() local
224 if (fileLength > TICKET_MAX_SIZE) { in VerifyTicket()
225 HAPVERIFY_LOG_ERROR("file length %{public}lld is too larger", fileLength); in VerifyTicket()
228 int32_t fileLen = static_cast<int>(fileLength); in VerifyTicket()
/ohos5.0/base/security/appverify/interfaces/innerkits/appverify/src/util/
H A Dhap_signing_block_utils.cpp101 long long fileLength = hapFile.GetLength(); in FindEocdInHap() local
103 if (fileLength < ZIP_EOCD_SEG_MIN_SIZE) { in FindEocdInHap()
104 HAPVERIFY_LOG_ERROR("file length %{public}lld is too smaller", fileLength); in FindEocdInHap()
109 if (fileLength < static_cast<long long>(searchRange)) { in FindEocdInHap()
110 searchRange = static_cast<int>(fileLength); in FindEocdInHap()
114 long long searchRangeOffset = fileLength - searchEocdBuffer.GetCapacity(); in FindEocdInHap()
/ohos5.0/foundation/multimedia/image_framework/plugins/common/libs/image/libjpegplugin/include/
H A Dexif_info.h147 …ool WriteExifDataToFile(ExifData *data, unsigned int orginExifDataLength, unsigned long fileLength,
159 uint32_t GetFileInfoByPath(const std::string &path, FILE **file, unsigned long &fileLength,
161 …uint32_t GetFileInfoByFd(int localFd, FILE **file, unsigned long &fileLength, unsigned char **file…
/ohos5.0/foundation/multimedia/image_framework/frameworks/kits/js/common/include/
H A Dimage_resource_utils.h37 long fileLength = 0; member
/ohos5.0/base/security/appverify/interfaces/innerkits/appverify/include/common/
H A Drandom_access_file.h52 long long fileLength; variable
/ohos5.0/foundation/ability/ability_base/interfaces/kits/native/extractortool/src/
H A Dzip_file.cpp189 …size_t fileLength = (directoryEntry.nameSize >= MAX_FILE_NAME) ? (MAX_FILE_NAME - 1) : directoryEn… in ParseOneEntry() local
190 std::string fileName(fileLength, 0); in ParseOneEntry()
191 if (memcpy_s(&(fileName[0]), fileLength, entryPtr, fileLength) != EOK) { in ParseOneEntry()
282 auto fileLength = zipFileReader_->GetFileLen(); in Open() local
283 fileLength_ = static_cast<ZipPos>(fileLength); in Open()
/ohos5.0/base/print/print_fwk/frameworks/models/print_models/src/
H A Dprint_job.cpp408 uint32_t fileLength = fdList_.size(); in Dump() local
409 for (uint32_t i = 0; i < fileLength; i++) { in Dump()
/ohos5.0/foundation/multimedia/image_framework/plugins/common/libs/image/libextplugin/src/heif_impl/
H A DHeifDecoderImpl.cpp262 size_t fileLength = stream->getLength(); in init() local
264 if (fileLength == 0) { in init()
268 srcMemory_ = new uint8_t[fileLength]; in init()
272 stream->read(srcMemory_, fileLength); in init()
275 heif_error err = HeifParser::MakeFromMemory(srcMemory_, fileLength, false, &parser_); in init()
/ohos5.0/foundation/multimedia/image_framework/plugins/common/libs/image/libextplugin/src/
H A Dext_decoder.cpp2232 size_t fileLength = stream_->GetStreamSize(); in HeapMemAlloc() local
2233 if (fileLength <= 0) { in HeapMemAlloc()
2236 uint8_t *fileMem = reinterpret_cast<uint8_t*>(malloc(fileLength)); in HeapMemAlloc()
2240 readRet = stream_->Read(fileLength, fileMem, fileLength, readSize); in HeapMemAlloc()
2241 if (!readRet || readSize != fileLength) { in HeapMemAlloc()
2248 heif_error parseRet = HeifParser::MakeFromMemory(fileMem, fileLength, false, &parser); in HeapMemAlloc()

12