diff options
-rw-r--r-- | libdex/DexSwapVerify.cpp | 5 | ||||
-rw-r--r-- | vm/analysis/DexPrepare.cpp | 6 |
2 files changed, 5 insertions, 6 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; } diff --git a/vm/analysis/DexPrepare.cpp b/vm/analysis/DexPrepare.cpp index cef1996a2..e8112d543 100644 --- a/vm/analysis/DexPrepare.cpp +++ b/vm/analysis/DexPrepare.cpp @@ -967,12 +967,6 @@ static bool loadAllClasses(DvmDex* pDvmDex) classDescriptor = dexStringByTypeIdx(pDvmDex->pDexFile, pClassDef->classIdx); - if ((pClassDef->accessFlags & ~ACC_CLASS_MASK) != 0) { - ALOGE("DexOpt: invalid access flags 0x%08x for class '%s'", - pClassDef->accessFlags, classDescriptor); - return false; - } - ALOGV("+++ loading '%s'", classDescriptor); //newClass = dvmDefineClass(pDexFile, classDescriptor, // NULL); |