| 2486 | } |
| 2487 | |
| 2488 | bool DexFileVerifier::CheckInterMethodHandleItem() { |
| 2489 | const DexFile::MethodHandleItem* item = reinterpret_cast<const DexFile::MethodHandleItem*>(ptr_); |
| 2490 | |
| 2491 | DexFile::MethodHandleType method_handle_type = |
| 2492 | static_cast<DexFile::MethodHandleType>(item->method_handle_type_); |
| 2493 | if (method_handle_type > DexFile::MethodHandleType::kLast) { |
| 2494 | ErrorStringPrintf("Bad method handle type %x", item->method_handle_type_); |
| 2495 | return false; |
| 2496 | } |
| 2497 | |
| 2498 | uint32_t index = item->field_or_method_idx_; |
| 2499 | switch (method_handle_type) { |
| 2500 | case DexFile::MethodHandleType::kStaticPut: |
| 2501 | case DexFile::MethodHandleType::kStaticGet: |
| 2502 | case DexFile::MethodHandleType::kInstancePut: |
| 2503 | case DexFile::MethodHandleType::kInstanceGet: { |
| 2504 | LOAD_FIELD(field, index, "method_handle_item field_idx", return false); |
| 2505 | break; |
| 2506 | } |
| 2507 | case DexFile::MethodHandleType::kInvokeStatic: |
| 2508 | case DexFile::MethodHandleType::kInvokeInstance: |
| 2509 | case DexFile::MethodHandleType::kInvokeConstructor: |
| 2510 | case DexFile::MethodHandleType::kInvokeDirect: |
| 2511 | case DexFile::MethodHandleType::kInvokeInterface: { |
| 2512 | LOAD_METHOD(method, index, "method_handle_item method_idx", return false); |
| 2513 | break; |
| 2514 | } |
| 2515 | } |
| 2516 | |
| 2517 | ptr_ += sizeof(DexFile::MethodHandleItem); |
| 2518 | return true; |
| 2519 | } |
| 2520 | |
| 2521 | bool DexFileVerifier::CheckInterAnnotationSetRefList() { |
| 2522 | const DexFile::AnnotationSetRefList* list = |
nothing calls this directly
no outgoing calls
no test coverage detected