aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Ivanov <dimitry@google.com>2016-05-19 17:46:10 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-05-19 17:46:10 +0000
commitc912ed05196d18b4f9ce0876b52b600437d1b497 (patch)
tree5e2bb753c1c47c3af1272ef8570d195c1c90ecae
parente9cb77f082c224f31c4c4d04a613594f459a94b8 (diff)
parenta5c1c8e820ec3057f798f675bf8af19a4a29b396 (diff)
downloadbionic-c912ed05196d18b4f9ce0876b52b600437d1b497.tar.gz
Merge "Do not check zip-entry validity on create_namespace" into nyc-dev
-rw-r--r--linker/linker.cpp36
1 files changed, 0 insertions, 36 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 3112a1e37..af23d446e 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -472,42 +472,6 @@ static void resolve_paths(std::vector<std::string>& paths,
continue;
}
- ZipArchiveHandle handle = nullptr;
- void* cookie = nullptr;
- auto zip_guard = make_scope_guard([&]() {
- if (cookie != nullptr) {
- EndIteration(cookie);
- }
- if (handle != nullptr) {
- CloseArchive(handle);
- }
- });
- if (OpenArchive(resolved_path, &handle) != 0) {
- DL_WARN("Warning: unable to open zip archive: %s", resolved_path);
- continue;
- }
-
- // Check if zip-file has a dir with entry_path name
- std::string prefix_str = entry_path + "/";
- ZipString prefix(prefix_str.c_str());
-
- ZipEntry out_data;
- ZipString out_name;
-
- int32_t error_code;
-
- if ((error_code = StartIteration(handle, &cookie, &prefix, nullptr)) != 0) {
- DL_WARN("Unable to iterate over zip-archive entries \"%s\";"
- " error code: %d", zip_path.c_str(), error_code);
- continue;
- }
-
- if (Next(cookie, &out_data, &out_name) != 0) {
- DL_WARN("Unable to find entries starting with \"%s\" in \"%s\"",
- prefix_str.c_str(), zip_path.c_str());
- continue;
- }
-
resolved_paths->push_back(std::string(resolved_path) + kZipFileSeparator + entry_path);
}
}