summaryrefslogtreecommitdiffstats
path: root/linker
diff options
context:
space:
mode:
authorDmitriy Ivanov <dimitry@google.com>2015-06-11 21:54:53 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-11 21:55:09 +0000
commitae1e75458ad281f121116c8c5dfe9d8086e43a2b (patch)
tree9fd99a761b59b0308d2845ebd50ba7e7d0a64bfc /linker
parent38263dd91a4b68e2ad0afe458c9a20cb360dafeb (diff)
parent524f1f1efe0cb32714c61e26f21701ac952b9e42 (diff)
downloadbionic-ae1e75458ad281f121116c8c5dfe9d8086e43a2b.zip
bionic-ae1e75458ad281f121116c8c5dfe9d8086e43a2b.tar.gz
bionic-ae1e75458ad281f121116c8c5dfe9d8086e43a2b.tar.bz2
Merge "Make path to apk compliant with jar url format" into mnc-dev
Diffstat (limited to 'linker')
-rw-r--r--linker/linker.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp
index c353290..bbdd1b0 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -1082,11 +1082,11 @@ static int open_library_in_zipfile(const char* const path,
off64_t* file_offset) {
TRACE("Trying zip file open from path '%s'", path);
- // Treat an '!' character inside a path as the separator between the name
+ // Treat an '!/' separator inside a path as the separator between the name
// of the zip file on disk and the subdirectory to search within it.
- // For example, if path is "foo.zip!bar/bas/x.so", then we search for
+ // For example, if path is "foo.zip!/bar/bas/x.so", then we search for
// "bar/bas/x.so" within "foo.zip".
- const char* separator = strchr(path, '!');
+ const char* separator = strstr(path, "!/");
if (separator == nullptr) {
return -1;
}
@@ -1100,7 +1100,7 @@ static int open_library_in_zipfile(const char* const path,
buf[separator - path] = '\0';
const char* zip_path = buf;
- const char* file_path = &buf[separator - path + 1];
+ const char* file_path = &buf[separator - path + 2];
int fd = TEMP_FAILURE_RETRY(open(zip_path, O_RDONLY | O_CLOEXEC));
if (fd == -1) {
return -1;