summaryrefslogtreecommitdiffstats
path: root/libunwindstack/DexFiles.cpp
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2018-10-23 17:42:41 -0700
committerChristopher Ferris <cferris@google.com>2018-10-29 18:08:09 -0700
commit4568f4bc0f116f097a13b1d931de93cf525ae204 (patch)
tree2832d853a8b2dfa6f66f1c5d04d22df742b22d4d /libunwindstack/DexFiles.cpp
parent2a8460721ca219ea2d9bc00e0412297afd12df47 (diff)
downloadsystem_core-4568f4bc0f116f097a13b1d931de93cf525ae204.tar.gz
system_core-4568f4bc0f116f097a13b1d931de93cf525ae204.tar.bz2
system_core-4568f4bc0f116f097a13b1d931de93cf525ae204.zip
Verify that the elf matches the expected arch.
To avoid a case where a malicious app might try and trick the system to create an elf and register object that mismatches, always verify that they are the same arch. Test: Ran unit tests. Change-Id: I66978e9e02f8e4f396856912e7019528ead4838e
Diffstat (limited to 'libunwindstack/DexFiles.cpp')
-rw-r--r--libunwindstack/DexFiles.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libunwindstack/DexFiles.cpp b/libunwindstack/DexFiles.cpp
index ac55fee99..451a0b90d 100644
--- a/libunwindstack/DexFiles.cpp
+++ b/libunwindstack/DexFiles.cpp
@@ -54,8 +54,8 @@ DexFiles::~DexFiles() {
}
}
-void DexFiles::SetArch(ArchEnum arch) {
- switch (arch) {
+void DexFiles::ProcessArch() {
+ switch (arch()) {
case ARCH_ARM:
case ARCH_MIPS:
case ARCH_X86: