Home
last modified time | relevance | path

Searched refs:fileLen (Results 1 – 18 of 18) sorted by relevance

/base/update/updater/services/package/pkg_verify/
Dzip_pkg_parse.cpp56 size_t fileLen = pkgStream->GetFileLength(); in ParseZipPkg() local
58 …PKG_CHECK(fileLen > footerSize, UPDATER_LAST_WORD(PKG_INVALID_FILE, fileLen); return PKG_INVALID_F… in ParseZipPkg()
60 size_t footerStart = fileLen - footerSize; in ParseZipPkg()
77 PKG_CHECK(fileLen > eocdTotalLen, UPDATER_LAST_WORD(PKG_INVALID_PKG_FORMAT); in ParseZipPkg()
80 size_t zipEocdStart = fileLen - eocdTotalLen; in ParseZipPkg()
90 …PKG_CHECK(fileLen > signCommentTotalLen, UPDATER_LAST_WORD(PKG_INVALID_PKG_FORMAT, fileLen, signCo… in ParseZipPkg()
91 …return PKG_INVALID_FILE, "file len[%zu] < signCommentTotalLen[%zu]", fileLen, signCommentTotalLen); in ParseZipPkg()
92 signatureStart = fileLen - signCommentTotalLen; in ParseZipPkg()
Dpkg_verify_util.cpp43 size_t fileLen = pkgStream->GetFileLength(); in VerifyPackageSign() local
44 if (fileLen < (signatureSize + ZIP_EOCD_FIXED_PART_LEN)) { in VerifyPackageSign()
45 PKG_LOGE("Invalid fileLen[%zu] and signature size[%zu]", fileLen, signatureSize); in VerifyPackageSign()
46 UPDATER_LAST_WORD(PKG_INVALID_PARAM, fileLen, signatureSize); in VerifyPackageSign()
56 size_t srcDataLen = fileLen - signatureSize - ZIP_EOCD_FIXED_PART_LEN; in VerifyPackageSign()
/base/telephony/sms_mms/frameworks/native/mms/src/
Dmms_buffer.cpp107 long fileLen = ftell(pFile); in WriteBufferFromFile() local
108 if (fileLen <= 0 || fileLen > (long)CODE_BUFFER_MAX_SIZE) { in WriteBufferFromFile()
117 pduBuffer_ = std::make_unique<char[]>(fileLen); in WriteBufferFromFile()
Dmms_body_part.cpp434 long fileLen = ftell(pFile); in WriteBodyFromFile() local
435 if (fileLen <= 0 || fileLen > (long)MAX_MMS_MSG_PART_LEN) { in WriteBodyFromFile()
437 TELEPHONY_LOGE("fileLen is invalid [%{public}ld]", fileLen); in WriteBodyFromFile()
443 pbodyPartBuffer_ = std::make_unique<char[]>(fileLen); in WriteBodyFromFile()
/base/security/appverify/interfaces/innerkits/appverify/src/init/
Dhap_crl_manager.cpp120 long long fileLen = crlRandomAccess.GetLength(); in ReadCrls() local
121 if (fileLen <= 0) { in ReadCrls()
122 HAPVERIFY_LOG_WARN(LABEL, "crl fileLen: %{public}lld", fileLen); in ReadCrls()
125 crlsBuffer.SetCapacity(fileLen); in ReadCrls()
127 if (readLen != fileLen) { in ReadCrls()
128 …RIFY_LOG_ERROR(LABEL, "read file len: %{public}lld is not same as %{public}lld", readLen, fileLen); in ReadCrls()
/base/update/updater/test/unittest/updater_binary/
Dupdater_binary_unittest.cpp80 size_t fileLen = stream->GetFileLength(); in BuildFileDigest() local
81 …PKG_CHECK(fileLen > 0, pkgManager->ClosePkgStream(stream); return PKG_INVALID_FILE, "invalid file … in BuildFileDigest()
82 PKG_CHECK(fileLen <= SIZE_MAX, pkgManager->ClosePkgStream(stream); return PKG_INVALID_FILE, in BuildFileDigest()
83 "Invalid file len %zu to load %s", fileLen, stream->GetFileName().c_str()); in BuildFileDigest()
95 while (offset < fileLen) { in BuildFileDigest()
/base/update/updater/test/fuzztest/UpdaterStartUpdaterProc_fuzzer/
DUpdaterStartUpdaterProc_fuzzer.cpp57 size_t fileLen = stream->GetFileLength(); in BuildFileDigest() local
58 …PKG_CHECK(fileLen > 0, packageManager->ClosePkgStream(stream); return PKG_INVALID_FILE, "invalid f… in BuildFileDigest()
59 … PKG_CHECK(fileLen <= SIZE_MAX, packageManager->ClosePkgStream(stream); return PKG_INVALID_FILE, in BuildFileDigest()
60 "Invalid file len %zu to load %s", fileLen, stream->GetFileName().c_str()); in BuildFileDigest()
72 while (offset < fileLen) { in BuildFileDigest()
/base/update/updater/test/unittest/package/
Dpkg_test.h76 size_t fileLen = stream->GetFileLength(); in BuildFileDigest() local
77 … PKG_CHECK(fileLen > 0, pkgManager_->ClosePkgStream(stream); return -1, "invalid file to load"); in BuildFileDigest()
78 PKG_CHECK(fileLen <= SIZE_MAX, pkgManager_->ClosePkgStream(stream); return -1, in BuildFileDigest()
79 "Invalid file len %zu to load %s", fileLen, stream->GetFileName().c_str()); in BuildFileDigest()
91 while (offset < fileLen) { in BuildFileDigest()
/base/update/updater/test/fuzztest/extractandexecutescript_fuzzer/
Dextractandexecutescript_fuzzer.cpp187 size_t fileLen = stream->GetFileLength(); in BuildFileDigest() local
188 …PKG_CHECK(fileLen > 0, packageManager->ClosePkgStream(stream); return PKG_INVALID_FILE, "invalid f… in BuildFileDigest()
189 … PKG_CHECK(fileLen <= SIZE_MAX, packageManager->ClosePkgStream(stream); return PKG_INVALID_FILE, in BuildFileDigest()
190 "Invalid file len %zu to load %s", fileLen, stream->GetFileName().c_str()); in BuildFileDigest()
202 while (offset < fileLen) { in BuildFileDigest()
/base/update/updater/services/package/pkg_package/
Dpkg_upgradefile.cpp30 #define TLV_CHECK_AND_RETURN(tlv, tlvType, len, fileLen) \ argument
32 if (!((tlv)->length < (fileLen) && (tlv)->length >= (len) && (tlv)->type == (tlvType) && \
33 ((tlv)->length + sizeof(PkgTlv)) < (fileLen))) { \
181 size_t fileLen = pkgStream_->GetFileLength(); in LoadPackage() local
185 PKG_CHECK(fileLen > 0 && fileLen >= buffSize, in LoadPackage()
186 …turn PKG_INVALID_FILE, "Invalid file %s fileLen:%zu ", pkgStream_->GetFileName().c_str(), fileLen); in LoadPackage()
197 PKG_CHECK(parsedLen + UPGRADE_RESERVE_LEN + GetUpgradeSignatureLen() < fileLen, in LoadPackage()
260 size_t fileLen = pkgStream_->GetFileLength(); in ReadComponents() local
267 TLV_CHECK_AND_RETURN(&tlv, 5, sizeof(UpgradeCompInfo), fileLen); // component type is 5 in ReadComponents()
315 size_t fileLen = pkgStream_->GetFileLength(); in ReadUpgradePkgHeader() local
[all …]
Dpkg_zipfile.cpp120 size_t fileLen = pkgStream_->GetFileLength(); in LoadPackage() local
133 || (endDir.offset >= fileLen) || (endDir.totalEntriesInThisDisk != endDir.totalEntries) || in LoadPackage()
134 ((endDir.offset + endDir.sizeOfCentralDir + endDirLen) > fileLen) in LoadPackage()
146 return ParseFileEntries(fileNames, endDir, currentPos, fileLen); in LoadPackage()
155 return ParseFileEntries(fileNames, endDir, currentPos, fileLen); in LoadPackage()
165 size_t fileLen = pkgStream_->GetFileLength(); in LoadPackage() local
166 PKG_CHECK(fileLen > 0, return PKG_INVALID_FILE, "invalid file to load"); in LoadPackage()
167 PKG_CHECK(fileLen <= SIZE_MAX, return PKG_INVALID_FILE, in LoadPackage()
168 "Invalid file len %zu to load %s", fileLen, pkgStream_->GetFileName().c_str()); in LoadPackage()
169 PKG_CHECK(fileLen >= static_cast<size_t>(sizeof(EndCentralDir)), return PKG_INVALID_FILE, in LoadPackage()
[all …]
Dpkg_zipfile.h191 size_t currentPos, size_t fileLen);
/base/theme/wallpaper_mgr/frameworks/innerkitsimpl/wallpaper_manager/include/
Di_wallpaper_service.h61 int fileLen; member
/base/security/appverify/interfaces/innerkits/appverify/src/ticket/
Dticket_verify.cpp233 int fileLen = static_cast<int>(fileLength); in VerifyTicket() local
234 HapByteBuffer ticketBlock(fileLen); in VerifyTicket()
/base/update/updater/test/unittest/test_data/applypatch/
DTestDecompressGzip.new.gz
/base/security/huks/services/huks_standard/huks_service/main/core/src/
Dhks_storage_lite.c171 uint32_t fileLen = HksFileSize(HKS_KEY_STORE_PATH, fileName); in FreshImageBuffer() local
172 if (fileLen < (totalLen + offset)) { /* keyfile len at least totalLen + offset */ in FreshImageBuffer()
173 … HKS_LOG_E("total Len: %" LOG_PUBLIC "u, invalid file size: %" LOG_PUBLIC "u", totalLen, fileLen); in FreshImageBuffer()
180 fileLen = HksFileRead(HKS_KEY_STORE_PATH, fileName, offset, buf, totalLen); in FreshImageBuffer()
181 if (fileLen == 0) { in FreshImageBuffer()
/base/update/updater/services/package/pkg_manager/
Dpkg_managerImpl.cpp647 size_t fileLen = (hashBufferLen == 0) ? stream->GetFileLength() : hashBufferLen; in CreatePkgStream() local
662 size_t needReadLen = fileLen; in CreatePkgStream()
666 PKG_ONLY_CHECK(SIGN_TOTAL_LEN < fileLen, return PKG_INVALID_SIGNATURE); in CreatePkgStream()
667 needReadLen = fileLen - SIGN_TOTAL_LEN; in CreatePkgStream()
881 size_t fileLen = stream->GetFileLength(); in CreatePkgStream() local
882 if (fileLen <= 0) { in CreatePkgStream()
/base/telephony/sms_mms/test/unittest/
Dmms_msg_test.cpp876 uint32_t fileLen = fwrite(buff.get(), len, 1, pFile); in WriteBufferToFile() local
877 if (fileLen > 0) { in WriteBufferToFile()