Chromium Code Reviews| 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 10a64bfa63ee9b6290ba88a64ec33340d48073e4..3b1d2efe5f2ebc16d3783d79ee3f0b040fa1e4c3 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 |
| @@ -223,6 +223,18 @@ crazy_status_t crazy_library_open(crazy_library_t** library, |
| return CRAZY_STATUS_SUCCESS; |
| } |
| +crazy_status_t crazy_library_filename_in_zip_file( |
| + const char* lib_name, char* buffer, size_t buffer_size) { |
| + crazy::String pathname = |
| + crazy::LibraryList::LibraryFilenameInZipFile(lib_name); |
| + if (pathname.size() >= buffer_size) { |
| + return CRAZY_STATUS_FAILURE; |
| + } |
| + memcpy(buffer, pathname.c_str(), pathname.size()); |
| + buffer[pathname.size()] = '\0'; |
|
picksi1
2014/10/28 12:25:26
Would strncpy(buffer, pathname.c_str(), pathname.s
Anton
2014/10/28 12:42:15
Agreed, though strncpy does not guarantee the null
|
| + return CRAZY_STATUS_SUCCESS; |
| +} |
| + |
| crazy_status_t crazy_library_open_in_zip_file(crazy_library_t** library, |
| const char* zipfile_name, |
| const char* lib_name, |