OSDN Git Service
(root)
/
android-x86
/
dalvik.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69fcce6
)
Reject dex files that attempt to use unspecified class access flags
author
Ben Gruver
<bgruv@google.com>
Mon, 6 May 2013 17:47:25 +0000
(10:47 -0700)
committer
Ben Gruver
<bgruv@google.com>
Mon, 6 May 2013 17:47:25 +0000
(10:47 -0700)
Change-Id: Ib1ecf3dfe1856a9014c2e9b0d6a1725ba7617f98
vm/analysis/DexPrepare.cpp
patch
|
blob
|
history
diff --git
a/vm/analysis/DexPrepare.cpp
b/vm/analysis/DexPrepare.cpp
index
e8112d5
..
cef1996
100644
(file)
--- a/
vm/analysis/DexPrepare.cpp
+++ b/
vm/analysis/DexPrepare.cpp
@@
-967,6
+967,12
@@
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);