/foundation/ai/intelligent_voice_framework/llt/hdt/depend_libs/src/ |
H A D | file_ex.cpp | 45 int fileLength = file.tellg(); in LoadStringFromFile() local 46 if (fileLength > MAX_FILE_LENGTH) { in LoadStringFromFile() 47 UTILS_LOGD("invalid file length(%{public}d)", fileLength); in LoadStringFromFile() 97 const long fileLength = lseek(fd, 0, SEEK_END); in LoadStringFromFd() local 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() 119 const long len = read(fd, content.data(), fileLength); in LoadStringFromFd() 120 if (len != fileLength) { in LoadStringFromFd() 226 const long fileLength = file.tellg(); LoadBufferFromFile() local [all...] |
/foundation/bundlemanager/distributed_bundle_framework/services/dbms/include/ |
H A D | image_compress.h | 37 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 &imageType); 39 bool GetImageFileInfo(const std::string &srcFile, std::unique_ptr<uint8_t[]> &fileContent, int64_t &fileLength);
|
H A D | distributed_bms.h | 151 bool GetMediaBase64(std::unique_ptr<uint8_t[]> &data, int64_t fileLength,
|
/foundation/bundlemanager/distributed_bundle_framework/services/dbms/src/ |
H A D | image_compress.cpp | 81 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() 101 ImageType type = GetImageType(fileData, fileLength); in GetImageTypeString() 111 std::unique_ptr<uint8_t[]> &fileContent, int64_t &fileLength) in GetImageFileInfo() 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() 98 GetImageTypeString(const std::unique_ptr<uint8_t[]> &fileData, size_t fileLength, std::string &imageType) GetImageTypeString() argument 110 GetImageFileInfo(const std::string &srcFile, std::unique_ptr<uint8_t[]> &fileContent, int64_t &fileLength) GetImageFileInfo() argument
|
H A D | distributed_bms.cpp | 449 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()
|
/foundation/multimedia/image_framework/frameworks/innerkitsimpl/test/unittest/plugin_test/ |
H A D | plugin_libjpeg_test.cpp | 921 unsigned long fileLength = 100;
in HWTEST_F() local 922 unsigned char *fileBuf = static_cast<unsigned char *>(malloc(fileLength));
in HWTEST_F() 923 exinfo.CreateExifData(fileBuf, fileLength, &ptrExifData, isNewExifData);
in HWTEST_F() 952 unsigned long fileLength = 100;
in HWTEST_F() local 953 unsigned char *fileBuf = static_cast<unsigned char *>(malloc(fileLength));
in HWTEST_F() 954 exinfo.CreateExifData(fileBuf, fileLength, &ptrExifData, isNewExifData);
in HWTEST_F() 976 unsigned long fileLength = 100;
in HWTEST_F() local 977 unsigned char *fileBuf = static_cast<unsigned char *>(malloc(fileLength));
in HWTEST_F() 978 exinfo.CreateExifData(fileBuf, fileLength, &ptrExifData, isNewExifData);
in HWTEST_F() 1000 unsigned long fileLength in HWTEST_F() local 1024 unsigned long fileLength = 100; HWTEST_F() local 1048 unsigned long fileLength = 100; HWTEST_F() local 1077 unsigned long fileLength = 100; HWTEST_F() local 1104 unsigned long fileLength = 100; HWTEST_F() local 1128 unsigned long fileLength = 100; HWTEST_F() local 1152 unsigned long fileLength = 100; HWTEST_F() local 1180 unsigned long fileLength = 100; HWTEST_F() local 1210 unsigned long fileLength = 100; HWTEST_F() local 1252 unsigned long fileLength = 100; HWTEST_F() local 1614 unsigned long fileLength = exinfo.GetFileSize(file); HWTEST_F() local 1653 unsigned long fileLength = exinfo.GetFileSize(file); HWTEST_F() local 1676 unsigned long fileLength = exinfo.GetFileSize(file); HWTEST_F() local 1701 unsigned long fileLength = exinfo.GetFileSize(file); HWTEST_F() local 1727 unsigned long fileLength = exinfo.GetFileSize(file); HWTEST_F() local [all...] |
/foundation/bundlemanager/bundle_framework/services/bundlemgr/src/ |
H A D | zip_file.cpp | 140 size_t fileLength = (directoryEntry.nameSize >= MAX_FILE_PATH) ? (MAX_FILE_PATH - 1) : directoryEntry.nameSize; 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.nameSize; 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() [all...] |
/foundation/bundlemanager/bundle_framework_lite/services/bundlemgr_lite/src/ |
H A D | zip_file.cpp | 143 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.nameSize; 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() 390 "(%{public}ud) > fileLength( in SeekToEntryStart() [all...] |
/foundation/multimedia/image_framework/plugins/common/libs/image/libjpegplugin/src/ |
H A D | exif_info.cpp | 588 uint32_t EXIFInfo::GetFileInfoByPath(const std::string &path, FILE **file, unsigned long &fileLength, in GetFileInfoByPath() argument 598 fileLength = GetFileSize(*file); in GetFileInfoByPath() 599 if (fileLength == 0 || fileLength > MAX_FILE_SIZE) { in GetFileInfoByPath() 605 *fileBuf = static_cast<unsigned char *>(malloc(fileLength)); in GetFileInfoByPath() 612 if (fread(*fileBuf, fileLength, 1, *file) != 1) { in GetFileInfoByPath() 629 unsigned long fileLength; in ModifyExifData() local 631 uint32_t res = GetFileInfoByPath(path, &file, fileLength, &fileBuf); in ModifyExifData() 638 if (!CreateExifData(fileBuf, fileLength, &ptrExifData, isNewExifData)) { in ModifyExifData() 666 if (!WriteExifDataToFile(ptrExifData, orginExifDataLength, fileLength, fileBu in ModifyExifData() 676 GetFileInfoByFd(int localFd, FILE **file, unsigned long &fileLength, unsigned char **fileBuf) GetFileInfoByFd() argument 719 unsigned long fileLength; ModifyExifData() local 1437 WriteExifDataToFile(ExifData *data, unsigned int orginExifDataLength, unsigned long fileLength, unsigned char *buf, FILE *fp) WriteExifDataToFile() argument 1504 unsigned long fileLength = GetFileSize(fp); UpdateCacheExifData() local [all...] |
/foundation/multimedia/image_framework/frameworks/kits/js/common/include/ |
H A D | image_resource_utils.h | 37 long fileLength = 0; member
|
/foundation/bundlemanager/distributed_bundle_framework/services/dbms/test/unittest/dbms_services_kit_test/ |
H A D | dbms_services_kit_test.cpp | 865 constexpr size_t fileLength = 7; in HWTEST_F() local 866 ImageType res = imageCompress->GetImageType(fileData, fileLength); in HWTEST_F() 884 constexpr size_t fileLength = 7; in HWTEST_F() local 886 bool res = imageCompress->GetImageTypeString(fileData, fileLength, imageType); in HWTEST_F() 904 int64_t fileLength; in HWTEST_F() local 907 HAP_FILE_PATH, fileContent, fileLength); in HWTEST_F() 1386 constexpr size_t fileLength = 64; in HWTEST_F() local 1387 std::unique_ptr<uint8_t[]> fileData = std::make_unique<uint8_t[]>(fileLength); in HWTEST_F() 1392 ImageType res = imageCompress->GetImageType(fileData, fileLength); in HWTEST_F() 1408 constexpr size_t fileLength in HWTEST_F() local 1429 constexpr size_t fileLength = 64; HWTEST_F() local 1452 constexpr size_t fileLength = 64; HWTEST_F() local 1475 int64_t fileLength; HWTEST_F() local 1499 int64_t fileLength = 64; HWTEST_F() local [all...] |
/foundation/CastEngine/castengine_cast_framework/service/src/session/src/stream/src/local/include/ |
H A D | local_data_source.h | 75 LocalDataSource(const std::string &fileId, int64_t fileLength, in LocalDataSource() argument 77 : fileId_(fileId), fileLength_(fileLength), channelClient_(channelClient) {} in LocalDataSource()
|
/foundation/CastEngine/castengine_cast_plus_stream/src/stream/src/local/include/ |
H A D | local_data_source.h | 75 LocalDataSource(const std::string &fileId, int64_t fileLength, in LocalDataSource() argument 77 : fileId_(fileId), fileLength_(fileLength), channelClient_(channelClient) {} in LocalDataSource()
|
/foundation/multimedia/image_framework/plugins/common/libs/image/libjpegplugin/include/ |
H A D | exif_info.h | 147 bool 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 **fileBuf);
|
/foundation/ability/ability_base/interfaces/kits/native/extractortool/src/ |
H A D | zip_file.cpp | 179 size_t fileLength = (directoryEntry.nameSize >= MAX_FILE_NAME) ? (MAX_FILE_NAME - 1) : directoryEntry.nameSize; in ParseOneEntry() local 180 std::string fileName(fileLength, 0); in ParseOneEntry() 181 if (memcpy_s(&(fileName[0]), fileLength, entryPtr, fileLength) != EOK) { in ParseOneEntry() 272 auto fileLength = zipFileReader_->GetFileLen(); in Open() local 273 fileLength_ = static_cast<ZipPos>(fileLength); in Open()
|
/foundation/multimedia/image_framework/plugins/common/libs/image/libextplugin/src/heif_impl/ |
H A D | HeifDecoderImpl.cpp | 260 size_t fileLength = stream->getLength(); in init() local 262 if (fileLength == 0) { in init() 266 srcMemory_ = new uint8_t[fileLength]; in init() 270 stream->read(srcMemory_, fileLength); in init() 273 heif_error err = HeifParser::MakeFromMemory(srcMemory_, fileLength, false, &parser_); in init()
|
/foundation/multimedia/image_framework/plugins/common/libs/image/libextplugin/src/ |
H A D | ext_decoder.cpp | 2127 size_t fileLength = stream_->GetStreamSize();
in HeapMemAlloc() local 2128 if (fileLength <= 0) {
in HeapMemAlloc() 2131 uint8_t *fileMem = reinterpret_cast<uint8_t*>(malloc(fileLength));
in HeapMemAlloc() 2135 readRet = stream_->Read(fileLength, fileMem, fileLength, readSize);
in HeapMemAlloc() 2136 if (!readRet || readSize != fileLength) {
in HeapMemAlloc() 2143 heif_error parseRet = HeifParser::MakeFromMemory(fileMem, fileLength, false, &parser);
in HeapMemAlloc()
|
/foundation/arkui/ace_engine/frameworks/bridge/js_frontend/engine/jsi/ |
H A D | jsi_engine.cpp | 1212 auto fileLength = ParseUtf8TextLength(fileText); in JsReadText() local 1219 if (!ParseResourceNumberParam(READ_KEY_LENGTH, params, length) || (length > fileLength - position + 1)) { in JsReadText() 1220 length = (fileLength - position + 1 <= 0) ? 0 : fileLength - position + 1; in JsReadText() 1223 if (fileLength == 0) { in JsReadText() 1230 if ((position > fileLength) || (position <= 0) || (length < 0)) { in JsReadText() 1288 auto fileLength = static_cast<int32_t>(binaryContent.size()); in JsReadArrayBuffer() local 1289 if (position > fileLength || position <= 0 || length <= 0) { in JsReadArrayBuffer() 1290 LOGE("JsReadArrayBuffer position fileLength failed"); in JsReadArrayBuffer() 1296 length = position + length - 1 > fileLength in JsReadArrayBuffer() [all...] |
/foundation/arkui/ui_lite/interfaces/kits/font/ |
H A D | ui_font_header.h | 409 uint32_t fileLength; member
|
/foundation/multimedia/av_session/services/session/server/ |
H A D | avsession_service.cpp | 2654 const long fileLength = file.tellg(); in LoadStringFromFileEx() local 2655 SLOGD("get file length(%{public}ld)!", fileLength); in LoadStringFromFileEx() 2656 if (fileLength > maxFileLength) { in LoadStringFromFileEx() 2657 SLOGE("invalid file length(%{public}ld)!", fileLength); in LoadStringFromFileEx() 2660 if (fileLength <= 0) { in LoadStringFromFileEx()
|
/foundation/multimedia/player_framework/frameworks/native/system_sound_manager/ |
H A D | system_sound_manager_impl.cpp | 396 const long fileLength = file.tellg(); in GetJsonValue() local 397 if (fileLength > maxFileLength) { in GetJsonValue() 398 MEDIA_LOGE("invalid file length(%{public}ld)!", fileLength); in GetJsonValue()
|
/foundation/multimedia/image_framework/frameworks/kits/js/common/ |
H A D | image_source_mdk_kits.cpp | 339 resource.fileLength = rawFileLength; in ImageSourceNapiCreateFromRawFile()
|
/foundation/graphic/graphic_3d/lume/Lume_3D/src/gltf/ |
H A D | gltf2_loader.cpp | 2881 const uint64_t fileLength = file->GetLength(); 2882 if (fileLength > SIZE_MAX) { 2894 result.data->size = static_cast<size_t>(fileLength);
|