| 2537 | } |
| 2538 | |
| 2539 | bool DexFileVerifier::CheckInterAnnotationSetItem() { |
| 2540 | const DexFile::AnnotationSetItem* set = reinterpret_cast<const DexFile::AnnotationSetItem*>(ptr_); |
| 2541 | const uint32_t* offsets = set->entries_; |
| 2542 | uint32_t count = set->size_; |
| 2543 | uint32_t last_idx = 0; |
| 2544 | |
| 2545 | for (uint32_t i = 0; i < count; i++) { |
| 2546 | if (*offsets != 0 && !CheckOffsetToTypeMap(*offsets, DexFile::kDexTypeAnnotationItem)) { |
| 2547 | return false; |
| 2548 | } |
| 2549 | |
| 2550 | // Get the annotation from the offset and the type index for the annotation. |
| 2551 | const DexFile::AnnotationItem* annotation = |
| 2552 | reinterpret_cast<const DexFile::AnnotationItem*>(begin_ + *offsets); |
| 2553 | const uint8_t* data = annotation->annotation_; |
| 2554 | DECODE_UNSIGNED_CHECKED_FROM(data, idx); |
| 2555 | |
| 2556 | if (UNLIKELY(last_idx >= idx && i != 0)) { |
| 2557 | ErrorStringPrintf("Out-of-order entry types: %x then %x", last_idx, idx); |
| 2558 | return false; |
| 2559 | } |
| 2560 | |
| 2561 | last_idx = idx; |
| 2562 | offsets++; |
| 2563 | } |
| 2564 | |
| 2565 | ptr_ = reinterpret_cast<const uint8_t*>(offsets); |
| 2566 | return true; |
| 2567 | } |
| 2568 | |
| 2569 | bool DexFileVerifier::CheckInterClassDataItem() { |
| 2570 | ClassDataItemIterator it(*dex_file_, ptr_); |
nothing calls this directly
no outgoing calls
no test coverage detected