Commit Graph

3 Commits

Author SHA1 Message Date
Jiyong Park d970ccb56e Fix nullpointer dereference in libnativeloader
The `char* path` argument of OpenNativeLibrary() can be nullptr. We are
constructing std::string from the path, which is a bug. Fixing it by
using char* without converting it to std::string.

Test: run-gtests.sh
JniCompilerTest.CompileAndRunIntMethodThroughStubNormalCompiler
is successful.

Change-Id: I91249da7c1a72a2dff9bc77e477b465e0c7ee056
2019-05-17 18:51:44 +09:00
Jiyong Park 16a9896ff7 Fix style around header inclusion
This change is to be in sync with other libraries in system/core.

External headers are included via #include <...> rather
than #include "...", which is for headers from the current library.

Bug: 130388701
Test: build & pass presubmit tests

Change-Id: Ifb87ebaea1b0ff95e2e79352e6a42e3bfd949c52
2019-05-16 08:55:11 +09:00
Jiyong Park 8537781cc7 Hide non-bridged/bridged namespaces behind NativeLoaderNamespace class
NativeLoaderNamespace fully abstracts the non-bridged (so called
android-) and bridged namespaces.

Bug: 130388701
Test: build & pass presubmit tests
Change-Id: I3d5ca7515711e7638f4a5ab4d3a150185c3d17ac
2019-05-16 08:55:04 +09:00