Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1035)

Unified Diff: third_party/android_crazy_linker/src/src/crazy_linker_api.cpp

Issue 684163002: Library loading fallback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update for review feedback Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/android_crazy_linker/src/src/crazy_linker_api.cpp
diff --git a/third_party/android_crazy_linker/src/src/crazy_linker_api.cpp b/third_party/android_crazy_linker/src/src/crazy_linker_api.cpp
index 8a83adfe2a0d162737315b0e3e705ec8e7045dba..08be94ba7010395fba253040786977cd2b1d1b0a 100644
--- a/third_party/android_crazy_linker/src/src/crazy_linker_api.cpp
+++ b/third_party/android_crazy_linker/src/src/crazy_linker_api.cpp
@@ -372,6 +372,19 @@ crazy_status_t crazy_library_find_from_address(void* address,
}
}
+crazy_status_t crazy_library_filename_in_zip_file(const char* lib_name,
+ char* buffer,
+ size_t buffer_size) {
+ crazy::String file_name = crazy::LibraryList::GetLibraryFilenameInZipFile(
+ lib_name);
+ if (file_name.size() >= buffer_size) {
picksi1 2014/10/30 10:48:08 For discussion/thought: should the failure mode he
petrcermak 2014/10/30 19:55:07 I would personally keep it as is - the function do
+ return CRAZY_STATUS_FAILURE;
+ }
+
+ strncpy(buffer, file_name.c_str(), file_name.size() + 1);
picksi1 2014/10/30 10:48:08 generally strncpy() would get the sizeof(buffer) p
petrcermak 2014/10/30 19:55:07 I use "file_name.size() + 1" here because I know t
+ return CRAZY_STATUS_SUCCESS;
+}
+
crazy_status_t crazy_linker_check_library_aligned_in_zip_file(
const char* zipfile_name,
const char* lib_name) {

Powered by Google App Engine
This is Rietveld 408576698