Lines Matching refs:entry_offset
111 incfs::verified_map_ptr<ResTable_type> type, uint32_t entry_offset) { in VerifyResTableEntry() argument
113 if (UNLIKELY(entry_offset & 0x03U)) { in VerifyResTableEntry()
114 LOG(ERROR) << "Entry at offset " << entry_offset << " is not 4-byte aligned."; in VerifyResTableEntry()
119 if (UNLIKELY(entry_offset > std::numeric_limits<uint32_t>::max() - dtohl(type->entriesStart))) { in VerifyResTableEntry()
121 LOG(ERROR) << "Entry at offset " << entry_offset << " is too large."; in VerifyResTableEntry()
127 entry_offset += dtohl(type->entriesStart); in VerifyResTableEntry()
128 if (UNLIKELY(entry_offset > chunk_size - sizeof(ResTable_entry))) { in VerifyResTableEntry()
129 LOG(ERROR) << "Entry at offset " << entry_offset in VerifyResTableEntry()
134 auto entry = type.offset(entry_offset).convert<ResTable_entry>(); in VerifyResTableEntry()
141 LOG(ERROR) << "ResTable_entry size " << entry_size << " at offset " << entry_offset in VerifyResTableEntry()
146 if (UNLIKELY(entry_size > chunk_size || entry_offset > chunk_size - entry_size)) { in VerifyResTableEntry()
147 LOG(ERROR) << "ResTable_entry size " << entry_size << " at offset " << entry_offset in VerifyResTableEntry()
154 if (UNLIKELY(entry_offset + entry_size > chunk_size - sizeof(Res_value))) { in VerifyResTableEntry()
155 LOG(ERROR) << "No room for Res_value after ResTable_entry at offset " << entry_offset in VerifyResTableEntry()
167 LOG(ERROR) << "Res_value at offset " << entry_offset << " is too small."; in VerifyResTableEntry()
171 if (UNLIKELY(value_size > chunk_size || entry_offset + entry_size > chunk_size - value_size)) { in VerifyResTableEntry()
172 LOG(ERROR) << "Res_value size " << value_size << " at offset " << entry_offset in VerifyResTableEntry()
183 size_t map_entries_start = entry_offset + entry_size; in VerifyResTableEntry()
185 LOG(ERROR) << "Map entries at offset " << entry_offset << " start at unaligned offset."; in VerifyResTableEntry()
191 LOG(ERROR) << "Too many map entries in ResTable_map_entry at offset " << entry_offset << "."; in VerifyResTableEntry()
233 base::expected<uint32_t, NullOrIOError> entry_offset = GetEntryOffset(type_chunk, entry_index); in GetEntry() local
234 if (UNLIKELY(!entry_offset.has_value())) { in GetEntry()
235 return base::unexpected(entry_offset.error()); in GetEntry()
237 return GetEntryFromOffset(type_chunk, entry_offset.value()); in GetEntry()