Loading applypatch/imgdiff.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -682,9 +682,9 @@ bool ZipModeImage::InitializeChunks(const std::string& filename, ZipArchiveHandl } // Create a list of deflated zip entries, sorted by offset. std::vector<std::pair<std::string, ZipEntry>> temp_entries; std::vector<std::pair<std::string, ZipEntry64>> temp_entries; std::string name; ZipEntry entry; ZipEntry64 entry; while ((ret = Next(cookie, &entry, &name)) == 0) { if (entry.method == kCompressDeflated || limit_ > 0) { temp_entries.emplace_back(name, entry); Loading Loading @@ -757,7 +757,7 @@ bool ZipModeImage::InitializeChunks(const std::string& filename, ZipArchiveHandl } bool ZipModeImage::AddZipEntryToChunks(ZipArchiveHandle handle, const std::string& entry_name, ZipEntry* entry) { ZipEntry64* entry) { size_t compressed_len = entry->compressed_length; if (compressed_len == 0) return true; Loading applypatch/include/applypatch/imgdiff_image.h +2 −1 Original line number Diff line number Diff line Loading @@ -257,7 +257,8 @@ class ZipModeImage : public Image { // Initialize image chunks based on the zip entries. bool InitializeChunks(const std::string& filename, ZipArchiveHandle handle); // Add the a zip entry to the list. bool AddZipEntryToChunks(ZipArchiveHandle handle, const std::string& entry_name, ZipEntry* entry); bool AddZipEntryToChunks(ZipArchiveHandle handle, const std::string& entry_name, ZipEntry64* entry); // Return the real size of the zip file. (omit the trailing zeros that used for alignment) bool GetZipFileSize(size_t* input_file_size); Loading install/install.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -77,7 +77,7 @@ bool ReadMetadataFromPackage(ZipArchiveHandle zip, std::map<std::string, std::st CHECK(metadata != nullptr); static constexpr const char* METADATA_PATH = "META-INF/com/android/metadata"; ZipEntry entry; ZipEntry64 entry; if (FindEntry(zip, METADATA_PATH, &entry) != 0) { LOG(ERROR) << "Failed to find " << METADATA_PATH; return false; Loading Loading @@ -241,7 +241,7 @@ bool SetUpAbUpdateCommands(const std::string& package, ZipArchiveHandle zip, int // For A/B updates we extract the payload properties to a buffer and obtain the RAW payload offset // in the zip file. static constexpr const char* AB_OTA_PAYLOAD_PROPERTIES = "payload_properties.txt"; ZipEntry properties_entry; ZipEntry64 properties_entry; if (FindEntry(zip, AB_OTA_PAYLOAD_PROPERTIES, &properties_entry) != 0) { LOG(ERROR) << "Failed to find " << AB_OTA_PAYLOAD_PROPERTIES; return false; Loading @@ -256,7 +256,7 @@ bool SetUpAbUpdateCommands(const std::string& package, ZipArchiveHandle zip, int } static constexpr const char* AB_OTA_PAYLOAD = "payload.bin"; ZipEntry payload_entry; ZipEntry64 payload_entry; if (FindEntry(zip, AB_OTA_PAYLOAD, &payload_entry) != 0) { LOG(ERROR) << "Failed to find " << AB_OTA_PAYLOAD; return false; Loading @@ -278,7 +278,7 @@ bool SetUpNonAbUpdateCommands(const std::string& package, ZipArchiveHandle zip, // In non-A/B updates we extract the update binary from the package. static constexpr const char* UPDATE_BINARY_NAME = "META-INF/com/google/android/update-binary"; ZipEntry binary_entry; ZipEntry64 binary_entry; if (FindEntry(zip, UPDATE_BINARY_NAME, &binary_entry) != 0) { LOG(ERROR) << "Failed to find update binary " << UPDATE_BINARY_NAME; return false; Loading install/verifier.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -321,7 +321,7 @@ static std::vector<Certificate> IterateZipEntriesAndSearchForKeys(const ZipArchi std::vector<Certificate> result; std::string_view name; ZipEntry entry; ZipEntry64 entry; while ((iter_status = Next(cookie, &entry, &name)) == 0) { std::vector<uint8_t> pem_content(entry.uncompressed_length); if (int32_t extract_status = Loading install/wipe_device.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ std::vector<std::string> GetWipePartitionList(Package* wipe_package) { constexpr char RECOVERY_WIPE_ENTRY_NAME[] = "recovery.wipe"; std::string partition_list_content; ZipEntry entry; ZipEntry64 entry; if (FindEntry(zip, RECOVERY_WIPE_ENTRY_NAME, &entry) == 0) { uint32_t length = entry.uncompressed_length; partition_list_content = std::string(length, '\0'); Loading Loading
applypatch/imgdiff.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -682,9 +682,9 @@ bool ZipModeImage::InitializeChunks(const std::string& filename, ZipArchiveHandl } // Create a list of deflated zip entries, sorted by offset. std::vector<std::pair<std::string, ZipEntry>> temp_entries; std::vector<std::pair<std::string, ZipEntry64>> temp_entries; std::string name; ZipEntry entry; ZipEntry64 entry; while ((ret = Next(cookie, &entry, &name)) == 0) { if (entry.method == kCompressDeflated || limit_ > 0) { temp_entries.emplace_back(name, entry); Loading Loading @@ -757,7 +757,7 @@ bool ZipModeImage::InitializeChunks(const std::string& filename, ZipArchiveHandl } bool ZipModeImage::AddZipEntryToChunks(ZipArchiveHandle handle, const std::string& entry_name, ZipEntry* entry) { ZipEntry64* entry) { size_t compressed_len = entry->compressed_length; if (compressed_len == 0) return true; Loading
applypatch/include/applypatch/imgdiff_image.h +2 −1 Original line number Diff line number Diff line Loading @@ -257,7 +257,8 @@ class ZipModeImage : public Image { // Initialize image chunks based on the zip entries. bool InitializeChunks(const std::string& filename, ZipArchiveHandle handle); // Add the a zip entry to the list. bool AddZipEntryToChunks(ZipArchiveHandle handle, const std::string& entry_name, ZipEntry* entry); bool AddZipEntryToChunks(ZipArchiveHandle handle, const std::string& entry_name, ZipEntry64* entry); // Return the real size of the zip file. (omit the trailing zeros that used for alignment) bool GetZipFileSize(size_t* input_file_size); Loading
install/install.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -77,7 +77,7 @@ bool ReadMetadataFromPackage(ZipArchiveHandle zip, std::map<std::string, std::st CHECK(metadata != nullptr); static constexpr const char* METADATA_PATH = "META-INF/com/android/metadata"; ZipEntry entry; ZipEntry64 entry; if (FindEntry(zip, METADATA_PATH, &entry) != 0) { LOG(ERROR) << "Failed to find " << METADATA_PATH; return false; Loading Loading @@ -241,7 +241,7 @@ bool SetUpAbUpdateCommands(const std::string& package, ZipArchiveHandle zip, int // For A/B updates we extract the payload properties to a buffer and obtain the RAW payload offset // in the zip file. static constexpr const char* AB_OTA_PAYLOAD_PROPERTIES = "payload_properties.txt"; ZipEntry properties_entry; ZipEntry64 properties_entry; if (FindEntry(zip, AB_OTA_PAYLOAD_PROPERTIES, &properties_entry) != 0) { LOG(ERROR) << "Failed to find " << AB_OTA_PAYLOAD_PROPERTIES; return false; Loading @@ -256,7 +256,7 @@ bool SetUpAbUpdateCommands(const std::string& package, ZipArchiveHandle zip, int } static constexpr const char* AB_OTA_PAYLOAD = "payload.bin"; ZipEntry payload_entry; ZipEntry64 payload_entry; if (FindEntry(zip, AB_OTA_PAYLOAD, &payload_entry) != 0) { LOG(ERROR) << "Failed to find " << AB_OTA_PAYLOAD; return false; Loading @@ -278,7 +278,7 @@ bool SetUpNonAbUpdateCommands(const std::string& package, ZipArchiveHandle zip, // In non-A/B updates we extract the update binary from the package. static constexpr const char* UPDATE_BINARY_NAME = "META-INF/com/google/android/update-binary"; ZipEntry binary_entry; ZipEntry64 binary_entry; if (FindEntry(zip, UPDATE_BINARY_NAME, &binary_entry) != 0) { LOG(ERROR) << "Failed to find update binary " << UPDATE_BINARY_NAME; return false; Loading
install/verifier.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -321,7 +321,7 @@ static std::vector<Certificate> IterateZipEntriesAndSearchForKeys(const ZipArchi std::vector<Certificate> result; std::string_view name; ZipEntry entry; ZipEntry64 entry; while ((iter_status = Next(cookie, &entry, &name)) == 0) { std::vector<uint8_t> pem_content(entry.uncompressed_length); if (int32_t extract_status = Loading
install/wipe_device.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ std::vector<std::string> GetWipePartitionList(Package* wipe_package) { constexpr char RECOVERY_WIPE_ENTRY_NAME[] = "recovery.wipe"; std::string partition_list_content; ZipEntry entry; ZipEntry64 entry; if (FindEntry(zip, RECOVERY_WIPE_ENTRY_NAME, &entry) == 0) { uint32_t length = entry.uncompressed_length; partition_list_content = std::string(length, '\0'); Loading