Lines Matching refs:header_
134 header_(&dex_file->GetHeader()), in DexFileVerifier()
181 DCHECK_LT(string_idx.index_, header_->string_ids_size_); in GetString()
183 OffsetToPtr<dex::StringId>(header_->string_ids_off_)[string_idx.index_]; in GetString()
194 CHECK_LT(class_idx.index_, header_->type_ids_size_); in GetClass()
196 const dex::TypeId& type_id = OffsetToPtr<dex::TypeId>(header_->type_ids_off_)[class_idx.index_]; in GetClass()
206 CHECK_LT(idx, header_->field_ids_size_); in GetFieldDescription()
208 const dex::FieldId& field_id = OffsetToPtr<dex::FieldId>(header_->field_ids_off_)[idx]; in GetFieldDescription()
218 CHECK_LT(idx, header_->method_ids_size_); in GetMethodDescription()
220 const dex::MethodId& method_id = OffsetToPtr<dex::MethodId>(header_->method_ids_off_)[idx]; in GetMethodDescription()
406 const DexFile::Header* const header_; member in art::dex::DexFileVerifier
479 DCHECK_LT(idx.index_, header_->type_ids_size_); in VerifyTypeDescriptor()
592 size_t hdr_offset = PtrToOffset(header_); in CheckValidOffsetAndSize()
622 if (!StandardDexFile::IsMagicValid(header_->magic_.data())) { in CheckHeader()
626 if (!StandardDexFile::IsVersionValid(header_->magic_.data())) { in CheckHeader()
630 dex_version_ = header_->GetVersion(); in CheckHeader()
633 size_t file_size = header_->file_size_; in CheckHeader()
646 if (header_->header_size_ != header_size) { in CheckHeader()
647 ErrorStringPrintf("Bad header size: %ud expected %zud", header_->header_size_, header_size); in CheckHeader()
652 if (header_->endian_tag_ != DexFile::kDexEndianConstant) { in CheckHeader()
653 ErrorStringPrintf("Unexpected endian_tag: %x", header_->endian_tag_); in CheckHeader()
659 if (adler_checksum != header_->checksum_) { in CheckHeader()
661 ErrorStringPrintf("Bad checksum (%08x, expected %08x)", adler_checksum, header_->checksum_); in CheckHeader()
665 "Ignoring bad checksum (%08x, expected %08x)", adler_checksum, header_->checksum_); in CheckHeader()
670 auto headerV41 = reinterpret_cast<const DexFile::HeaderV41*>(header_); in CheckHeader()
687 CheckValidOffsetAndSize(header_->link_off_, in CheckHeader()
688 header_->link_size_, in CheckHeader()
691 CheckValidOffsetAndSize(header_->map_off_, in CheckHeader()
695 CheckValidOffsetAndSize(header_->string_ids_off_, in CheckHeader()
696 header_->string_ids_size_, in CheckHeader()
699 CheckValidOffsetAndSize(header_->type_ids_off_, in CheckHeader()
700 header_->type_ids_size_, in CheckHeader()
703 CheckSizeLimit(header_->type_ids_size_, DexFile::kDexNoIndex16, "type-ids") && in CheckHeader()
704 CheckValidOffsetAndSize(header_->proto_ids_off_, in CheckHeader()
705 header_->proto_ids_size_, in CheckHeader()
708 CheckSizeLimit(header_->proto_ids_size_, DexFile::kDexNoIndex16, "proto-ids") && in CheckHeader()
709 CheckValidOffsetAndSize(header_->field_ids_off_, in CheckHeader()
710 header_->field_ids_size_, in CheckHeader()
713 CheckValidOffsetAndSize(header_->method_ids_off_, in CheckHeader()
714 header_->method_ids_size_, in CheckHeader()
717 CheckValidOffsetAndSize(header_->class_defs_off_, in CheckHeader()
718 header_->class_defs_size_, in CheckHeader()
721 CheckValidOffsetAndSize(header_->data_off_, in CheckHeader()
722 header_->data_size_, in CheckHeader()
731 : ArrayRef<const uint8_t>(OffsetToPtr(header_->data_off_), header_->data_size_); in CheckHeader()
737 const dex::MapList* map = OffsetToPtr<dex::MapList>(header_->map_off_); in CheckMap()
813 ((header_->string_ids_off_ != 0) || (header_->string_ids_size_ != 0)))) { in CheckMap()
818 ((header_->type_ids_off_ != 0) || (header_->type_ids_size_ != 0)))) { in CheckMap()
823 ((header_->proto_ids_off_ != 0) || (header_->proto_ids_size_ != 0)))) { in CheckMap()
828 ((header_->field_ids_off_ != 0) || (header_->field_ids_size_ != 0)))) { in CheckMap()
833 ((header_->method_ids_off_ != 0) || (header_->method_ids_size_ != 0)))) { in CheckMap()
838 ((header_->class_defs_off_ != 0) || (header_->class_defs_size_ != 0)))) { in CheckMap()
886 if (!CheckIndex(type_idx, header_->type_ids_size_, "handler type_idx")) { in CheckAndGetHandlerOffsets()
914 DCHECK_LE(idx, header_->field_ids_size_); in CheckClassDataItemField()
918 OffsetToPtr<dex::FieldId>(header_->field_ids_off_)[idx].class_idx_; in CheckClassDataItemField()
943 DCHECK_LT(idx, header_->method_ids_size_); in CheckClassDataItemMethod()
945 const dex::MethodId& method_id = OffsetToPtr<dex::MethodId>(header_->method_ids_off_)[idx]; in CheckClassDataItemMethod()
960 if (!CheckIndex(string_idx, header_->string_ids_size_, "method flags verification")) { in CheckClassDataItemMethod()
1086 if (!CheckIndex(idx, header_->string_ids_size_, "encoded_value string")) { in CheckEncodedValue()
1100 if (!CheckIndex(idx, header_->type_ids_size_, "encoded_value type")) { in CheckEncodedValue()
1115 if (!CheckIndex(idx, header_->field_ids_size_, "encoded_value field")) { in CheckEncodedValue()
1129 if (!CheckIndex(idx, header_->method_ids_size_, "encoded_value method")) { in CheckEncodedValue()
1173 if (!CheckIndex(idx, header_->proto_ids_size_, "method_type value")) { in CheckEncodedValue()
1217 if (!CheckIndex(anno_idx, header_->type_ids_size_, "encoded_annotation type_idx")) { in CheckEncodedAnnotation()
1229 if (!CheckIndex(idx, header_->string_ids_size_, "annotation_element name_idx")) { in CheckAnnotationElement()
1274 DCHECK_LT(index, header_->field_ids_size_); in CheckStaticFieldTypes()
1371 header_->string_ids_size_, in CheckIntraTypeIdItem()
1386 if (!CheckIndex(proto_id->shorty_idx_.index_, header_->string_ids_size_, "proto_id.shorty") || in CheckIntraProtoIdItem()
1388 header_->type_ids_size_, in CheckIntraProtoIdItem()
1403 if (!CheckIndex(field_id->class_idx_.index_, header_->type_ids_size_, "field_id.class") || in CheckIntraFieldIdItem()
1404 !CheckIndex(field_id->type_idx_.index_, header_->type_ids_size_, "field_id.type") || in CheckIntraFieldIdItem()
1405 !CheckIndex(field_id->name_idx_.index_, header_->string_ids_size_, "field_id.name")) { in CheckIntraFieldIdItem()
1419 if (!CheckIndex(method_id->class_idx_.index_, header_->type_ids_size_, "method_id.class") || in CheckIntraMethodIdItem()
1420 !CheckIndex(method_id->proto_idx_.index_, header_->proto_ids_size_, "method_id.proto") || in CheckIntraMethodIdItem()
1421 !CheckIndex(method_id->name_idx_.index_, header_->string_ids_size_, "method_id.name")) { in CheckIntraMethodIdItem()
1435 if (!CheckIndex(class_def->class_idx_.index_, header_->type_ids_size_, "class_def.class")) { in CheckIntraClassDefItem()
1448 header_->type_ids_size_, in CheckIntraClassDefItem()
1487 if (!CheckIndex(index, header_->field_ids_size_, "method_handle_item field_idx")) { in CheckIntraMethodHandleItem()
1496 if (!CheckIndex(index, header_->method_ids_size_, "method_handle_item method_idx")) { in CheckIntraMethodHandleItem()
1515 header_->type_ids_size_, in CheckIntraTypeList()
1541 if (!CheckIndex(curr_index, header_->field_ids_size_, "class_data_item field_idx")) { in CheckIntraClassDataItemFields()
1588 if (!CheckIndex(curr_index, header_->method_ids_size_, "class_data_item method_idx")) { in CheckIntraClassDataItemMethods()
1895 … if (!CheckIndex(parameter_name, header_->string_ids_size_, "debug_info_item parameter_name")) { in CheckIntraDebugInfoItem()
1928 if (!CheckIndex(name_idx, header_->string_ids_size_, "DBG_START_LOCAL name_idx")) { in CheckIntraDebugInfoItem()
1935 if (!CheckIndex(type_idx, header_->type_ids_size_, "DBG_START_LOCAL type_idx")) { in CheckIntraDebugInfoItem()
1959 … if (!CheckIndex(name_idx, header_->string_ids_size_, "DBG_START_LOCAL_EXTENDED name_idx")) { in CheckIntraDebugInfoItem()
1966 if (!CheckIndex(type_idx, header_->type_ids_size_, "DBG_START_LOCAL_EXTENDED type_idx")) { in CheckIntraDebugInfoItem()
1973 if (!CheckIndex(sig_idx, header_->string_ids_size_, "DBG_START_LOCAL_EXTENDED sig_idx")) { in CheckIntraDebugInfoItem()
1983 if (!CheckIndex(name_idx, header_->string_ids_size_, "DBG_SET_FILE name_idx")) { in CheckIntraDebugInfoItem()
2068 if (!CheckIndex(field_item->field_idx_, header_->field_ids_size_, "field annotation")) { in CheckIntraAnnotationsDirectoryItem()
2093 if (!CheckIndex(method_item->method_idx_, header_->method_ids_size_, "method annotation")) { in CheckIntraAnnotationsDirectoryItem()
2117 header_->method_ids_size_, in CheckIntraAnnotationsDirectoryItem()
2317 expected_offset = header_->string_ids_off_; in CheckIntraIdSection()
2318 expected_size = header_->string_ids_size_; in CheckIntraIdSection()
2321 expected_offset = header_->type_ids_off_; in CheckIntraIdSection()
2322 expected_size = header_->type_ids_size_; in CheckIntraIdSection()
2325 expected_offset = header_->proto_ids_off_; in CheckIntraIdSection()
2326 expected_size = header_->proto_ids_size_; in CheckIntraIdSection()
2329 expected_offset = header_->field_ids_off_; in CheckIntraIdSection()
2330 expected_size = header_->field_ids_size_; in CheckIntraIdSection()
2333 expected_offset = header_->method_ids_off_; in CheckIntraIdSection()
2334 expected_size = header_->method_ids_size_; in CheckIntraIdSection()
2337 expected_offset = header_->class_defs_off_; in CheckIntraIdSection()
2338 expected_size = header_->class_defs_size_; in CheckIntraIdSection()
2379 header_->data_off_, in CheckIntraDataSection()
2380 header_->data_size_); in CheckIntraDataSection()
2388 const dex::MapList* map = OffsetToPtr<dex::MapList>(header_->map_off_); in CheckIntraSection()
2396 std::min(header_->class_defs_size_, 65535u) + in CheckIntraSection()
2397 std::min(header_->string_ids_size_, 65535u) + in CheckIntraSection()
2398 2 * std::min(header_->method_ids_size_, 65535u)); in CheckIntraSection()
2429 ptr_ += header_->header_size_; in CheckIntraSection()
2452 if (UNLIKELY(section_offset != header_->map_off_)) { in CheckIntraSection()
2454 section_offset, header_->map_off_); in CheckIntraSection()
2673 size_t index = item - OffsetToPtr<dex::TypeId>(header_->type_ids_off_); in CheckInterTypeIdItem()
2674 DCHECK_LE(index, header_->type_ids_size_); in CheckInterTypeIdItem()
2919 if (header_->GetVersion() >= DexFile::kClassDefinitionOrderEnforcedVersion) { in CheckInterClassDefItem()
2957 if (header_->GetVersion() >= DexFile::kClassDefinitionOrderEnforcedVersion) { in CheckInterClassDefItem()
3162 DCHECK_LE(read_field.GetIndex(), header_->field_ids_size_); in CheckInterClassDataItem()
3185 DCHECK_LE(it->GetIndex(), header_->method_ids_size_); in CheckInterClassDataItem()
3228 DCHECK_LE(field_item->field_idx_, header_->field_ids_size_); in CheckInterAnnotationsDirectoryItem()
3246 DCHECK_LE(method_item->method_idx_, header_->method_ids_size_); in CheckInterAnnotationsDirectoryItem()
3264 DCHECK_LE(parameter_item->method_idx_, header_->method_ids_size_); in CheckInterAnnotationsDirectoryItem()
3417 const dex::StringId* string_ids = OffsetToPtr<dex::StringId>(header_->string_ids_off_); in CheckInterSection()
3418 for (size_t i = 0, num_strings = header_->string_ids_size_; i != num_strings; ++i) { in CheckInterSection()
3424 const dex::MapList* map = OffsetToPtr<dex::MapList>(header_->map_off_); in CheckInterSection()
3493 DCHECK_LE(header_->type_ids_size_, kTypeIdLimit + 1u); // Checked in CheckHeader(). in Verify()
3494 verified_type_descriptors_.resize(header_->type_ids_size_, 0); in Verify()
3495 defined_class_indexes_.resize(header_->type_ids_size_); in Verify()
3592 const dex::StringId* first = OffsetToPtr<dex::StringId>(header_->string_ids_off_); in FindStringRangesForMethodNames()
3593 const dex::StringId* last = first + header_->string_ids_size_; in FindStringRangesForMethodNames()
3841 CHECK_LT(method_index, header_->method_ids_size_); in CheckConstructorProperties()
3845 DCHECK_LE(method_id.proto_idx_.index_, header_->proto_ids_size_); in CheckConstructorProperties()