| 987 | } |
| 988 | |
| 989 | bool DexFileVerifier::CheckOrderAndGetClassDef(bool is_field, |
| 990 | const char* type_descr, |
| 991 | uint32_t curr_index, |
| 992 | uint32_t prev_index, |
| 993 | bool* have_class, |
| 994 | dex::TypeIndex* class_type_index, |
| 995 | const DexFile::ClassDef** class_def) { |
| 996 | if (curr_index < prev_index) { |
| 997 | ErrorStringPrintf("out-of-order %s indexes %" PRIu32 " and %" PRIu32, |
| 998 | type_descr, |
| 999 | prev_index, |
| 1000 | curr_index); |
| 1001 | return false; |
| 1002 | } |
| 1003 | |
| 1004 | if (!*have_class) { |
| 1005 | *have_class = FindClassIndexAndDef(curr_index, is_field, class_type_index, class_def); |
| 1006 | if (!*have_class) { |
| 1007 | // Should have really found one. |
| 1008 | ErrorStringPrintf("could not find declaring class for %s index %" PRIu32, |
| 1009 | type_descr, |
| 1010 | curr_index); |
| 1011 | return false; |
| 1012 | } |
| 1013 | } |
| 1014 | return true; |
| 1015 | } |
| 1016 | |
| 1017 | bool DexFileVerifier::CheckStaticFieldTypes(const DexFile::ClassDef* class_def) { |
| 1018 | if (class_def == nullptr) { |
nothing calls this directly
no outgoing calls
no test coverage detected