From 4f81130039f6a312eba2027b3594a2be282f6b3a Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Wed, 16 Sep 2020 14:06:12 -0400 Subject: Switch to zip64 in recovery There's already library support for zip64 in libziparchive. We just need to start using the new APIs. Bug: 167951876 Test: Sideload a large ota package in recovery Change-Id: I652741965f28de079d873c6822317ee9fa855201 --- updater/blockimg.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'updater/blockimg.cpp') diff --git a/updater/blockimg.cpp b/updater/blockimg.cpp index 2d41f610b..b29aa8ce3 100644 --- a/updater/blockimg.cpp +++ b/updater/blockimg.cpp @@ -348,7 +348,7 @@ class RangeSinkWriter { */ struct NewThreadInfo { ZipArchiveHandle za; - ZipEntry entry; + ZipEntry64 entry{}; bool brotli_compressed; std::unique_ptr writer; @@ -1626,7 +1626,7 @@ static bool Sha1DevicePath(const std::string& path, uint8_t digest[SHA_DIGEST_LE static Value* PerformBlockImageUpdate(const char* name, State* state, const std::vector>& argv, const CommandMap& command_map, bool dryrun) { - CommandParameters params = {}; + CommandParameters params{}; stash_map.clear(); params.canwrite = !dryrun; @@ -1687,7 +1687,7 @@ static Value* PerformBlockImageUpdate(const char* name, State* state, } std::string_view path_data(patch_data_fn->data); - ZipEntry patch_entry; + ZipEntry64 patch_entry; if (FindEntry(za, path_data, &patch_entry) != 0) { LOG(ERROR) << name << "(): no file \"" << patch_data_fn->data << "\" in package"; return StringValue(""); @@ -1695,7 +1695,7 @@ static Value* PerformBlockImageUpdate(const char* name, State* state, params.patch_start = updater->GetMappedPackageAddress() + patch_entry.offset; std::string_view new_data(new_data_fn->data); - ZipEntry new_entry; + ZipEntry64 new_entry; if (FindEntry(za, new_data, &new_entry) != 0) { LOG(ERROR) << name << "(): no file \"" << new_data_fn->data << "\" in package"; return StringValue(""); -- cgit v1.2.3