summaryrefslogtreecommitdiffstats
path: root/libdex/DexSwapVerify.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-05-13 18:50:41 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2013-05-13 18:50:41 +0000
commit9275963e79d1625120db610b78c3a0812ebb2922 (patch)
tree839b1ff8fb1ac762a14da9696e4ee03f768ece1a /libdex/DexSwapVerify.cpp
parent130eebad44c24874fb940884bfd8d9cde58dc367 (diff)
parentc2e9a5b2b70d69c027964c9a4d07a4bdf723dd36 (diff)
downloadandroid_dalvik-9275963e79d1625120db610b78c3a0812ebb2922.tar.gz
android_dalvik-9275963e79d1625120db610b78c3a0812ebb2922.tar.bz2
android_dalvik-9275963e79d1625120db610b78c3a0812ebb2922.zip
Merge "Move verification of class access flags to libdex"
Diffstat (limited to 'libdex/DexSwapVerify.cpp')
-rw-r--r--libdex/DexSwapVerify.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libdex/DexSwapVerify.cpp b/libdex/DexSwapVerify.cpp
index 4b3cf4493..6cc139dcf 100644
--- a/libdex/DexSwapVerify.cpp
+++ b/libdex/DexSwapVerify.cpp
@@ -911,6 +911,11 @@ static void* swapClassDefItem(const CheckState* state, void* ptr) {
SWAP_OFFSET4(item->annotationsOff);
SWAP_OFFSET4(item->classDataOff);
+ if ((item->accessFlags & ~ACC_CLASS_MASK) != 0) {
+ ALOGE("Bogus class access flags %x", item->accessFlags);
+ return NULL;
+ }
+
return item + 1;
}