diff options
| author | Ben Gruver <bgruv@google.com> | 2013-05-08 13:29:36 -0700 |
|---|---|---|
| committer | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2013-10-25 14:17:36 +0100 |
| commit | aa897b06230453519c4ec636f229c72ac0015897 (patch) | |
| tree | 428e551b646cbdf016efcf35ad1e26f532687760 /libdex | |
| parent | 2f824d3e4835479409724ea02d0a23114cd4ff81 (diff) | |
Move verification of class access flags to libdex
Change-Id: I020a168cfff46e319b0bebb6c7477f0b4139c6de
Diffstat (limited to 'libdex')
| -rw-r--r-- | libdex/DexSwapVerify.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libdex/DexSwapVerify.cpp b/libdex/DexSwapVerify.cpp index 24a86f9ba..2bb403e3f 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; } |
