Lines Matching refs:item

661   const dex::MapItem* item = map->list_;  in CheckMap()  local
671 if (!CheckListSize(item, count, sizeof(dex::MapItem), "map size")) { in CheckMap()
677 if (UNLIKELY(last_offset >= item->offset_ && i != 0)) { in CheckMap()
680 item->offset_, in CheckMap()
681 static_cast<uint32_t>(item->type_), in CheckMap()
685 if (UNLIKELY(item->offset_ >= header_->file_size_)) { in CheckMap()
687 item->offset_, header_->file_size_); in CheckMap()
691 DexFile::MapItemType item_type = static_cast<DexFile::MapItemType>(item->type_); in CheckMap()
693 uint32_t icount = item->size_; in CheckMap()
707 ErrorStringPrintf("Unknown map section type %x", item->type_); in CheckMap()
712 ErrorStringPrintf("Duplicate map section of type %x", item->type_); in CheckMap()
717 last_offset = item->offset_; in CheckMap()
718 last_type = item->type_; in CheckMap()
719 item++; in CheckMap()
1335 const dex::MethodHandleItem* item = reinterpret_cast<const dex::MethodHandleItem*>(ptr_); in CheckIntraMethodHandleItem() local
1338 static_cast<DexFile::MethodHandleType>(item->method_handle_type_); in CheckIntraMethodHandleItem()
1340 ErrorStringPrintf("Bad method handle type %x", item->method_handle_type_); in CheckIntraMethodHandleItem()
1344 uint32_t index = item->field_or_method_idx_; in CheckIntraMethodHandleItem()
1856 const dex::HiddenapiClassData* item = reinterpret_cast<const dex::HiddenapiClassData*>(ptr_); in CheckIntraHiddenapiClassData() local
1862 if (!CheckListSize(item, num_header_elems, elem_size, "hiddenapi class data section header")) { in CheckIntraHiddenapiClassData()
1867 if (!CheckListSize(item, item->size_, 1u, "hiddenapi class data section")) { in CheckIntraHiddenapiClassData()
1872 if (item->size_ < header_size) { in CheckIntraHiddenapiClassData()
1874 "Hiddenapi class data too short to store header (%u < %u)", item->size_, header_size); in CheckIntraHiddenapiClassData()
1878 const uint8_t* data_end = ptr_ + item->size_; in CheckIntraHiddenapiClassData()
1885 uint32_t offset = item->flags_offset_[i]; in CheckIntraHiddenapiClassData()
1899 if (offset > item->size_) { in CheckIntraHiddenapiClassData()
1902 offset, item->size_, i); in CheckIntraHiddenapiClassData()
1908 uint32_t ptr_offset = ptr_ - reinterpret_cast<const uint8_t*>(item); in CheckIntraHiddenapiClassData()
1947 static_cast<uint32_t>(ptr_ - reinterpret_cast<const uint8_t*>(item)), in CheckIntraHiddenapiClassData()
1948 item->size_); in CheckIntraHiddenapiClassData()
1956 const dex::AnnotationsDirectoryItem* item = in CheckIntraAnnotationsDirectoryItem() local
1958 if (!CheckListSize(item, 1, sizeof(dex::AnnotationsDirectoryItem), "annotations_directory")) { in CheckIntraAnnotationsDirectoryItem()
1964 reinterpret_cast<const dex::FieldAnnotationsItem*>(item + 1); in CheckIntraAnnotationsDirectoryItem()
1965 uint32_t field_count = item->fields_size_; in CheckIntraAnnotationsDirectoryItem()
1990 uint32_t method_count = item->methods_size_; in CheckIntraAnnotationsDirectoryItem()
2015 uint32_t parameter_count = item->parameters_size_; in CheckIntraAnnotationsDirectoryItem()
2298 const dex::MapItem* item = map->list_; in CheckIntraSection() local
2313 uint32_t section_offset = item->offset_; in CheckIntraSection()
2314 uint32_t section_count = item->size_; in CheckIntraSection()
2315 DexFile::MapItemType type = static_cast<DexFile::MapItemType>(item->type_); in CheckIntraSection()
2410 item++; in CheckIntraSection()
2454 const dex::AnnotationsDirectoryItem* item = in FindFirstAnnotationsDirectoryDefiner() local
2457 if (item->fields_size_ != 0) { in FindFirstAnnotationsDirectoryDefiner()
2458 dex::FieldAnnotationsItem* field_items = (dex::FieldAnnotationsItem*) (item + 1); in FindFirstAnnotationsDirectoryDefiner()
2463 if (item->methods_size_ != 0) { in FindFirstAnnotationsDirectoryDefiner()
2464 dex::MethodAnnotationsItem* method_items = (dex::MethodAnnotationsItem*) (item + 1); in FindFirstAnnotationsDirectoryDefiner()
2469 if (item->parameters_size_ != 0) { in FindFirstAnnotationsDirectoryDefiner()
2470 dex::ParameterAnnotationsItem* parameter_items = (dex::ParameterAnnotationsItem*) (item + 1); in FindFirstAnnotationsDirectoryDefiner()
2479 const dex::StringId* item = reinterpret_cast<const dex::StringId*>(ptr_); in CheckInterStringIdItem() local
2487 const char* str = dex_file_->GetStringData(*item); in CheckInterStringIdItem()
2499 const dex::TypeId* item = reinterpret_cast<const dex::TypeId*>(ptr_); in CheckInterTypeIdItem() local
2504 size_t index = item - reinterpret_cast<const dex::TypeId*>(begin_ + header_->type_ids_off_); in CheckInterTypeIdItem()
2517 if (UNLIKELY(prev_item->descriptor_idx_ >= item->descriptor_idx_)) { in CheckInterTypeIdItem()
2520 item->descriptor_idx_.index_); in CheckInterTypeIdItem()
2530 const dex::ProtoId* item = reinterpret_cast<const dex::ProtoId*>(ptr_); in CheckInterProtoIdItem() local
2532 const char* shorty = dex_file_->StringDataByIdx(item->shorty_idx_); in CheckInterProtoIdItem()
2534 if (item->parameters_off_ != 0 && in CheckInterProtoIdItem()
2535 !CheckOffsetToTypeMap(item->parameters_off_, DexFile::kDexTypeTypeList)) { in CheckInterProtoIdItem()
2540 if (UNLIKELY(!IsValidOrNoTypeId(item->return_type_idx_.index_, item->pad_))) { in CheckInterProtoIdItem()
2542 item->pad_, item->return_type_idx_.index_); in CheckInterProtoIdItem()
2546 const char* return_type = dex_file_->StringByTypeIdx(item->return_type_idx_); in CheckInterProtoIdItem()
2552 DexFileParameterIterator it(*dex_file_, *item); in CheckInterProtoIdItem()
2574 if (UNLIKELY(prev->return_type_idx_ > item->return_type_idx_)) { in CheckInterProtoIdItem()
2577 } else if (prev->return_type_idx_ == item->return_type_idx_) { in CheckInterProtoIdItem()
2578 DexFileParameterIterator curr_it(*dex_file_, *item); in CheckInterProtoIdItem()
2611 const dex::FieldId* item = reinterpret_cast<const dex::FieldId*>(ptr_); in CheckInterFieldIdItem() local
2614 if (UNLIKELY(!VerifyTypeDescriptor(item->class_idx_, in CheckInterFieldIdItem()
2621 if (UNLIKELY(!VerifyTypeDescriptor(item->type_idx_, in CheckInterFieldIdItem()
2628 const char* field_name = dex_file_->StringDataByIdx(item->name_idx_); in CheckInterFieldIdItem()
2637 if (UNLIKELY(prev_item->class_idx_ > item->class_idx_)) { in CheckInterFieldIdItem()
2640 } else if (prev_item->class_idx_ == item->class_idx_) { in CheckInterFieldIdItem()
2641 if (UNLIKELY(prev_item->name_idx_ > item->name_idx_)) { in CheckInterFieldIdItem()
2644 } else if (prev_item->name_idx_ == item->name_idx_) { in CheckInterFieldIdItem()
2645 if (UNLIKELY(prev_item->type_idx_ >= item->type_idx_)) { in CheckInterFieldIdItem()
2658 const dex::MethodId* item = reinterpret_cast<const dex::MethodId*>(ptr_); in CheckInterMethodIdItem() local
2661 if (UNLIKELY(!VerifyTypeDescriptor(item->class_idx_, in CheckInterMethodIdItem()
2668 const char* method_name = dex_file_->StringDataByIdx(item->name_idx_); in CheckInterMethodIdItem()
2675 if (UNLIKELY(!CheckIndex(item->proto_idx_.index_, dex_file_->NumProtoIds(), in CheckInterMethodIdItem()
2683 if (UNLIKELY(prev_item->class_idx_ > item->class_idx_)) { in CheckInterMethodIdItem()
2686 } else if (prev_item->class_idx_ == item->class_idx_) { in CheckInterMethodIdItem()
2687 if (UNLIKELY(prev_item->name_idx_ > item->name_idx_)) { in CheckInterMethodIdItem()
2690 } else if (prev_item->name_idx_ == item->name_idx_) { in CheckInterMethodIdItem()
2691 if (UNLIKELY(prev_item->proto_idx_ >= item->proto_idx_)) { in CheckInterMethodIdItem()
2704 const dex::ClassDef* item = reinterpret_cast<const dex::ClassDef*>(ptr_); in CheckInterClassDefItem() local
2707 if (UNLIKELY(!IsValidTypeId(item->class_idx_.index_, item->pad1_))) { in CheckInterClassDefItem()
2708 ErrorStringPrintf("class with type idx outside uint16_t range '%x:%x'", item->pad1_, in CheckInterClassDefItem()
2709 item->class_idx_.index_); in CheckInterClassDefItem()
2713 if (UNLIKELY(!IsValidOrNoTypeId(item->superclass_idx_.index_, item->pad2_))) { in CheckInterClassDefItem()
2714 ErrorStringPrintf("class with superclass type idx outside uint16_t range '%x:%x'", item->pad2_, in CheckInterClassDefItem()
2715 item->superclass_idx_.index_); in CheckInterClassDefItem()
2720 if (UNLIKELY(!VerifyTypeDescriptor(item->class_idx_, in CheckInterClassDefItem()
2727 if ((item->access_flags_ & ~kAccJavaFlagsMask) != 0) { in CheckInterClassDefItem()
2728 ErrorStringPrintf("Invalid class flags: '%d'", item->access_flags_); in CheckInterClassDefItem()
2732 if (item->interfaces_off_ != 0 && in CheckInterClassDefItem()
2733 !CheckOffsetToTypeMap(item->interfaces_off_, DexFile::kDexTypeTypeList)) { in CheckInterClassDefItem()
2736 if (item->annotations_off_ != 0 && in CheckInterClassDefItem()
2737 !CheckOffsetToTypeMap(item->annotations_off_, DexFile::kDexTypeAnnotationsDirectoryItem)) { in CheckInterClassDefItem()
2740 if (item->class_data_off_ != 0 && in CheckInterClassDefItem()
2741 !CheckOffsetToTypeMap(item->class_data_off_, DexFile::kDexTypeClassDataItem)) { in CheckInterClassDefItem()
2744 if (item->static_values_off_ != 0 && in CheckInterClassDefItem()
2745 !CheckOffsetToTypeMap(item->static_values_off_, DexFile::kDexTypeEncodedArrayItem)) { in CheckInterClassDefItem()
2749 if (item->superclass_idx_.IsValid()) { in CheckInterClassDefItem()
2753 if (UNLIKELY(item->superclass_idx_ == item->class_idx_)) { in CheckInterClassDefItem()
2755 item->class_idx_.index_); in CheckInterClassDefItem()
2761 const dex::ClassDef* superclass_def = dex_file_->FindClassDef(item->superclass_idx_); in CheckInterClassDefItem()
2764 if (superclass_def > item) { in CheckInterClassDefItem()
2769 item->class_idx_.index_, in CheckInterClassDefItem()
2770 item->superclass_idx_.index_); in CheckInterClassDefItem()
2776 if (UNLIKELY(!VerifyTypeDescriptor(item->superclass_idx_, in CheckInterClassDefItem()
2784 const dex::TypeList* interfaces = dex_file_->GetInterfacesList(*item); in CheckInterClassDefItem()
2791 if (UNLIKELY(interfaces->GetTypeItem(i).type_idx_ == item->class_idx_)) { in CheckInterClassDefItem()
2793 item->class_idx_.index_); in CheckInterClassDefItem()
2803 if (interface_def > item) { in CheckInterClassDefItem()
2808 item->class_idx_.index_, in CheckInterClassDefItem()
2840 if (item->class_data_off_ != 0) { in CheckInterClassDefItem()
2841 ClassAccessor accessor(*dex_file_, begin_ + item->class_data_off_); in CheckInterClassDefItem()
2844 if (UNLIKELY((data_definer != item->class_idx_.index_) && (data_definer != kDexNoIndex))) { in CheckInterClassDefItem()
2851 if (item->annotations_off_ != 0) { in CheckInterClassDefItem()
2853 if (!IsAlignedParam(item->annotations_off_, 4)) { in CheckInterClassDefItem()
2857 const uint8_t* data = begin_ + item->annotations_off_; in CheckInterClassDefItem()
2860 if (UNLIKELY((defining_class != item->class_idx_.index_) && (defining_class != kDexNoIndex))) { in CheckInterClassDefItem()
2871 const dex::CallSiteIdItem* item = reinterpret_cast<const dex::CallSiteIdItem*>(ptr_); in CheckInterCallSiteIdItem() local
2874 if (!CheckOffsetToTypeMap(item->data_off_, DexFile::kDexTypeEncodedArrayItem)) { in CheckInterCallSiteIdItem()
2879 CallSiteArrayValueIterator it(*dex_file_, *item); in CheckInterCallSiteIdItem()
2927 const dex::AnnotationSetRefItem* item = list->list_; in CheckInterAnnotationSetRefList() local
2931 if (item->annotations_off_ != 0 && in CheckInterAnnotationSetRefList()
2932 !CheckOffsetToTypeMap(item->annotations_off_, DexFile::kDexTypeAnnotationSetItem)) { in CheckInterAnnotationSetRefList()
2935 item++; in CheckInterAnnotationSetRefList()
2938 ptr_ = reinterpret_cast<const uint8_t*>(item); in CheckInterAnnotationSetRefList()
3039 const dex::AnnotationsDirectoryItem* item = in CheckInterAnnotationsDirectoryItem() local
3044 if (item->class_annotations_off_ != 0 && in CheckInterAnnotationsDirectoryItem()
3045 !CheckOffsetToTypeMap(item->class_annotations_off_, DexFile::kDexTypeAnnotationSetItem)) { in CheckInterAnnotationsDirectoryItem()
3051 reinterpret_cast<const dex::FieldAnnotationsItem*>(item + 1); in CheckInterAnnotationsDirectoryItem()
3052 uint32_t field_count = item->fields_size_; in CheckInterAnnotationsDirectoryItem()
3070 uint32_t method_count = item->methods_size_; in CheckInterAnnotationsDirectoryItem()
3088 uint32_t parameter_count = item->parameters_size_; in CheckInterAnnotationsDirectoryItem()
3248 const dex::MapItem* item = map->list_; in CheckInterSection() local
3253 uint32_t section_offset = item->offset_; in CheckInterSection()
3254 uint32_t section_count = item->size_; in CheckInterSection()
3255 DexFile::MapItemType type = static_cast<DexFile::MapItemType>(item->type_); in CheckInterSection()
3291 ErrorStringPrintf("Unknown map item type %x", item->type_); in CheckInterSection()
3295 item++; in CheckInterSection()