Lines Matching refs:item

394   const dex::MapItem* item = map->list_;  in CheckMap()  local
404 if (!CheckListSize(item, count, sizeof(dex::MapItem), "map size")) { in CheckMap()
410 if (UNLIKELY(last_offset >= item->offset_ && i != 0)) { in CheckMap()
413 item->offset_, in CheckMap()
414 static_cast<uint32_t>(item->type_), in CheckMap()
418 if (UNLIKELY(item->offset_ >= header_->file_size_)) { in CheckMap()
420 item->offset_, header_->file_size_); in CheckMap()
424 DexFile::MapItemType item_type = static_cast<DexFile::MapItemType>(item->type_); in CheckMap()
426 uint32_t icount = item->size_; in CheckMap()
440 ErrorStringPrintf("Unknown map section type %x", item->type_); in CheckMap()
445 ErrorStringPrintf("Duplicate map section of type %x", item->type_); in CheckMap()
450 last_offset = item->offset_; in CheckMap()
451 last_type = item->type_; in CheckMap()
452 item++; in CheckMap()
1560 const dex::HiddenapiClassData* item = reinterpret_cast<const dex::HiddenapiClassData*>(ptr_); in CheckIntraHiddenapiClassData() local
1566 if (!CheckListSize(item, num_header_elems, elem_size, "hiddenapi class data section header")) { in CheckIntraHiddenapiClassData()
1571 if (!CheckListSize(item, item->size_, 1u, "hiddenapi class data section")) { in CheckIntraHiddenapiClassData()
1576 if (item->size_ < header_size) { in CheckIntraHiddenapiClassData()
1578 "Hiddenapi class data too short to store header (%u < %u)", item->size_, header_size); in CheckIntraHiddenapiClassData()
1582 const uint8_t* data_end = ptr_ + item->size_; in CheckIntraHiddenapiClassData()
1589 uint32_t offset = item->flags_offset_[i]; in CheckIntraHiddenapiClassData()
1603 if (offset > item->size_) { in CheckIntraHiddenapiClassData()
1606 offset, item->size_, i); in CheckIntraHiddenapiClassData()
1612 uint32_t ptr_offset = ptr_ - reinterpret_cast<const uint8_t*>(item); in CheckIntraHiddenapiClassData()
1651 static_cast<uint32_t>(ptr_ - reinterpret_cast<const uint8_t*>(item)), in CheckIntraHiddenapiClassData()
1652 item->size_); in CheckIntraHiddenapiClassData()
1660 const dex::AnnotationsDirectoryItem* item = in CheckIntraAnnotationsDirectoryItem() local
1662 if (!CheckListSize(item, 1, sizeof(dex::AnnotationsDirectoryItem), "annotations_directory")) { in CheckIntraAnnotationsDirectoryItem()
1668 reinterpret_cast<const dex::FieldAnnotationsItem*>(item + 1); in CheckIntraAnnotationsDirectoryItem()
1669 uint32_t field_count = item->fields_size_; in CheckIntraAnnotationsDirectoryItem()
1691 uint32_t method_count = item->methods_size_; in CheckIntraAnnotationsDirectoryItem()
1713 uint32_t parameter_count = item->parameters_size_; in CheckIntraAnnotationsDirectoryItem()
1995 const dex::MapItem* item = map->list_; in CheckIntraSection() local
2003 uint32_t section_offset = item->offset_; in CheckIntraSection()
2004 uint32_t section_count = item->size_; in CheckIntraSection()
2005 DexFile::MapItemType type = static_cast<DexFile::MapItemType>(item->type_); in CheckIntraSection()
2098 item++; in CheckIntraSection()
2144 const dex::AnnotationsDirectoryItem* item = in FindFirstAnnotationsDirectoryDefiner() local
2148 if (item->fields_size_ != 0) { in FindFirstAnnotationsDirectoryDefiner()
2149 dex::FieldAnnotationsItem* field_items = (dex::FieldAnnotationsItem*) (item + 1); in FindFirstAnnotationsDirectoryDefiner()
2155 if (item->methods_size_ != 0) { in FindFirstAnnotationsDirectoryDefiner()
2156 dex::MethodAnnotationsItem* method_items = (dex::MethodAnnotationsItem*) (item + 1); in FindFirstAnnotationsDirectoryDefiner()
2162 if (item->parameters_size_ != 0) { in FindFirstAnnotationsDirectoryDefiner()
2163 dex::ParameterAnnotationsItem* parameter_items = (dex::ParameterAnnotationsItem*) (item + 1); in FindFirstAnnotationsDirectoryDefiner()
2173 const dex::StringId* item = reinterpret_cast<const dex::StringId*>(ptr_); in CheckInterStringIdItem() local
2176 if (!CheckOffsetToTypeMap(item->string_data_off_, DexFile::kDexTypeStringDataItem)) { in CheckInterStringIdItem()
2184 const char* str = dex_file_->GetStringData(*item); in CheckInterStringIdItem()
2196 const dex::TypeId* item = reinterpret_cast<const dex::TypeId*>(ptr_); in CheckInterTypeIdItem() local
2198 LOAD_STRING(descriptor, item->descriptor_idx_, "inter_type_id_item descriptor_idx") in CheckInterTypeIdItem()
2209 if (UNLIKELY(prev_item->descriptor_idx_ >= item->descriptor_idx_)) { in CheckInterTypeIdItem()
2212 item->descriptor_idx_.index_); in CheckInterTypeIdItem()
2222 const dex::ProtoId* item = reinterpret_cast<const dex::ProtoId*>(ptr_); in CheckInterProtoIdItem() local
2224 LOAD_STRING(shorty, item->shorty_idx_, "inter_proto_id_item shorty_idx") in CheckInterProtoIdItem()
2226 if (item->parameters_off_ != 0 && in CheckInterProtoIdItem()
2227 !CheckOffsetToTypeMap(item->parameters_off_, DexFile::kDexTypeTypeList)) { in CheckInterProtoIdItem()
2232 if (UNLIKELY(!IsValidOrNoTypeId(item->return_type_idx_.index_, item->pad_))) { in CheckInterProtoIdItem()
2234 item->pad_, item->return_type_idx_.index_); in CheckInterProtoIdItem()
2238 LOAD_STRING_BY_TYPE(return_type, item->return_type_idx_, "inter_proto_id_item return_type_idx") in CheckInterProtoIdItem()
2244 DexFileParameterIterator it(*dex_file_, *item); in CheckInterProtoIdItem()
2266 if (UNLIKELY(prev->return_type_idx_ > item->return_type_idx_)) { in CheckInterProtoIdItem()
2269 } else if (prev->return_type_idx_ == item->return_type_idx_) { in CheckInterProtoIdItem()
2270 DexFileParameterIterator curr_it(*dex_file_, *item); in CheckInterProtoIdItem()
2303 const dex::FieldId* item = reinterpret_cast<const dex::FieldId*>(ptr_); in CheckInterFieldIdItem() local
2306 LOAD_STRING_BY_TYPE(class_descriptor, item->class_idx_, "inter_field_id_item class_idx") in CheckInterFieldIdItem()
2313 LOAD_STRING_BY_TYPE(type_descriptor, item->type_idx_, "inter_field_id_item type_idx") in CheckInterFieldIdItem()
2320 LOAD_STRING(descriptor, item->name_idx_, "inter_field_id_item name_idx") in CheckInterFieldIdItem()
2329 if (UNLIKELY(prev_item->class_idx_ > item->class_idx_)) { in CheckInterFieldIdItem()
2332 } else if (prev_item->class_idx_ == item->class_idx_) { in CheckInterFieldIdItem()
2333 if (UNLIKELY(prev_item->name_idx_ > item->name_idx_)) { in CheckInterFieldIdItem()
2336 } else if (prev_item->name_idx_ == item->name_idx_) { in CheckInterFieldIdItem()
2337 if (UNLIKELY(prev_item->type_idx_ >= item->type_idx_)) { in CheckInterFieldIdItem()
2350 const dex::MethodId* item = reinterpret_cast<const dex::MethodId*>(ptr_); in CheckInterMethodIdItem() local
2353 LOAD_STRING_BY_TYPE(class_descriptor, item->class_idx_, "inter_method_id_item class_idx") in CheckInterMethodIdItem()
2361 LOAD_STRING(descriptor, item->name_idx_, "inter_method_id_item name_idx") in CheckInterMethodIdItem()
2368 if (UNLIKELY(!CheckIndex(item->proto_idx_.index_, dex_file_->NumProtoIds(), in CheckInterMethodIdItem()
2376 if (UNLIKELY(prev_item->class_idx_ > item->class_idx_)) { in CheckInterMethodIdItem()
2379 } else if (prev_item->class_idx_ == item->class_idx_) { in CheckInterMethodIdItem()
2380 if (UNLIKELY(prev_item->name_idx_ > item->name_idx_)) { in CheckInterMethodIdItem()
2383 } else if (prev_item->name_idx_ == item->name_idx_) { in CheckInterMethodIdItem()
2384 if (UNLIKELY(prev_item->proto_idx_ >= item->proto_idx_)) { in CheckInterMethodIdItem()
2397 const dex::ClassDef* item = reinterpret_cast<const dex::ClassDef*>(ptr_); in CheckInterClassDefItem() local
2400 if (UNLIKELY(!IsValidTypeId(item->class_idx_.index_, item->pad1_))) { in CheckInterClassDefItem()
2401 ErrorStringPrintf("class with type idx outside uint16_t range '%x:%x'", item->pad1_, in CheckInterClassDefItem()
2402 item->class_idx_.index_); in CheckInterClassDefItem()
2406 if (UNLIKELY(!IsValidOrNoTypeId(item->superclass_idx_.index_, item->pad2_))) { in CheckInterClassDefItem()
2407 ErrorStringPrintf("class with superclass type idx outside uint16_t range '%x:%x'", item->pad2_, in CheckInterClassDefItem()
2408 item->superclass_idx_.index_); in CheckInterClassDefItem()
2412 if (defined_classes_.find(item->class_idx_) != defined_classes_.end()) { in CheckInterClassDefItem()
2413 ErrorStringPrintf("Redefinition of class with type idx: '%d'", item->class_idx_.index_); in CheckInterClassDefItem()
2416 defined_classes_.insert(item->class_idx_); in CheckInterClassDefItem()
2418 LOAD_STRING_BY_TYPE(class_descriptor, item->class_idx_, "inter_class_def_item class_idx") in CheckInterClassDefItem()
2425 if ((item->access_flags_ & ~kAccJavaFlagsMask) != 0) { in CheckInterClassDefItem()
2426 ErrorStringPrintf("Invalid class flags: '%d'", item->access_flags_); in CheckInterClassDefItem()
2430 if (item->interfaces_off_ != 0 && in CheckInterClassDefItem()
2431 !CheckOffsetToTypeMap(item->interfaces_off_, DexFile::kDexTypeTypeList)) { in CheckInterClassDefItem()
2434 if (item->annotations_off_ != 0 && in CheckInterClassDefItem()
2435 !CheckOffsetToTypeMap(item->annotations_off_, DexFile::kDexTypeAnnotationsDirectoryItem)) { in CheckInterClassDefItem()
2438 if (item->class_data_off_ != 0 && in CheckInterClassDefItem()
2439 !CheckOffsetToTypeMap(item->class_data_off_, DexFile::kDexTypeClassDataItem)) { in CheckInterClassDefItem()
2442 if (item->static_values_off_ != 0 && in CheckInterClassDefItem()
2443 !CheckOffsetToTypeMap(item->static_values_off_, DexFile::kDexTypeEncodedArrayItem)) { in CheckInterClassDefItem()
2447 if (item->superclass_idx_.IsValid()) { in CheckInterClassDefItem()
2451 if (UNLIKELY(item->superclass_idx_ == item->class_idx_)) { in CheckInterClassDefItem()
2453 item->class_idx_.index_); in CheckInterClassDefItem()
2459 const dex::ClassDef* superclass_def = dex_file_->FindClassDef(item->superclass_idx_); in CheckInterClassDefItem()
2462 if (superclass_def > item) { in CheckInterClassDefItem()
2467 item->class_idx_.index_, in CheckInterClassDefItem()
2468 item->superclass_idx_.index_); in CheckInterClassDefItem()
2474 LOAD_STRING_BY_TYPE(superclass_descriptor, item->superclass_idx_, in CheckInterClassDefItem()
2483 const dex::TypeList* interfaces = dex_file_->GetInterfacesList(*item); in CheckInterClassDefItem()
2490 if (UNLIKELY(interfaces->GetTypeItem(i).type_idx_ == item->class_idx_)) { in CheckInterClassDefItem()
2492 item->class_idx_.index_); in CheckInterClassDefItem()
2502 if (interface_def > item) { in CheckInterClassDefItem()
2507 item->class_idx_.index_, in CheckInterClassDefItem()
2540 if (item->class_data_off_ != 0) { in CheckInterClassDefItem()
2541 const uint8_t* data = begin_ + item->class_data_off_; in CheckInterClassDefItem()
2547 if (UNLIKELY((data_definer != item->class_idx_) && in CheckInterClassDefItem()
2555 if (item->annotations_off_ != 0) { in CheckInterClassDefItem()
2557 if (!IsAlignedParam(item->annotations_off_, 4)) { in CheckInterClassDefItem()
2561 const uint8_t* data = begin_ + item->annotations_off_; in CheckInterClassDefItem()
2567 if (UNLIKELY((annotations_definer != item->class_idx_) && in CheckInterClassDefItem()
2579 const dex::CallSiteIdItem* item = reinterpret_cast<const dex::CallSiteIdItem*>(ptr_); in CheckInterCallSiteIdItem() local
2582 if (!CheckOffsetToTypeMap(item->data_off_, DexFile::kDexTypeEncodedArrayItem)) { in CheckInterCallSiteIdItem()
2587 CallSiteArrayValueIterator it(*dex_file_, *item); in CheckInterCallSiteIdItem()
2634 const dex::MethodHandleItem* item = reinterpret_cast<const dex::MethodHandleItem*>(ptr_); in CheckInterMethodHandleItem() local
2637 static_cast<DexFile::MethodHandleType>(item->method_handle_type_); in CheckInterMethodHandleItem()
2639 ErrorStringPrintf("Bad method handle type %x", item->method_handle_type_); in CheckInterMethodHandleItem()
2643 uint32_t index = item->field_or_method_idx_; in CheckInterMethodHandleItem()
2668 const dex::AnnotationSetRefItem* item = list->list_; in CheckInterAnnotationSetRefList() local
2672 if (item->annotations_off_ != 0 && in CheckInterAnnotationSetRefList()
2673 !CheckOffsetToTypeMap(item->annotations_off_, DexFile::kDexTypeAnnotationSetItem)) { in CheckInterAnnotationSetRefList()
2676 item++; in CheckInterAnnotationSetRefList()
2679 ptr_ = reinterpret_cast<const uint8_t*>(item); in CheckInterAnnotationSetRefList()
2747 const dex::AnnotationsDirectoryItem* item = in CheckInterAnnotationsDirectoryItem() local
2755 if (item->class_annotations_off_ != 0 && in CheckInterAnnotationsDirectoryItem()
2756 !CheckOffsetToTypeMap(item->class_annotations_off_, DexFile::kDexTypeAnnotationSetItem)) { in CheckInterAnnotationsDirectoryItem()
2762 reinterpret_cast<const dex::FieldAnnotationsItem*>(item + 1); in CheckInterAnnotationsDirectoryItem()
2763 uint32_t field_count = item->fields_size_; in CheckInterAnnotationsDirectoryItem()
2780 uint32_t method_count = item->methods_size_; in CheckInterAnnotationsDirectoryItem()
2797 uint32_t parameter_count = item->parameters_size_; in CheckInterAnnotationsDirectoryItem()
2953 const dex::MapItem* item = map->list_; in CheckInterSection() local
2958 uint32_t section_offset = item->offset_; in CheckInterSection()
2959 uint32_t section_count = item->size_; in CheckInterSection()
2960 DexFile::MapItemType type = static_cast<DexFile::MapItemType>(item->type_); in CheckInterSection()
2996 ErrorStringPrintf("Unknown map item type %x", item->type_); in CheckInterSection()
3000 item++; in CheckInterSection()