Home
last modified time | relevance | path

Searched refs:length (Results 1 – 25 of 28) sorted by relevance

12

/bootable/recovery/install/
Dasn1_decoder.cpp59 size_t length = 0; in decode_length() local
65 length <<= 8; in decode_length()
66 length += byte; in decode_length()
68 *out_len = length; in decode_length()
80 size_t length; in asn1_constructed_get() local
81 if (!decode_length(&length) || length > length_) { in asn1_constructed_get()
84 asn1_context* app_ctx = new asn1_context(p_, length); in asn1_constructed_get()
93 size_t length; in asn1_constructed_skip_all() local
94 if (!decode_length(&length) || !skip_bytes(length)) { in asn1_constructed_skip_all()
110 size_t length; in asn1_sequence_get() local
[all …]
Dpackage.cpp62 uint64_t length) override;
110 uint64_t length) override;
157 package_size_ = map_->length; in MemoryPackage()
187 uint64_t start, uint64_t length) { in UpdateHashAtOffset() argument
188 if (length > package_size_ || start > package_size_ - length) { in UpdateHashAtOffset()
189 LOG(ERROR) << "Out of bound read, offset: " << start << ", size: " << length in UpdateHashAtOffset()
195 hasher(addr_ + start, length); in UpdateHashAtOffset()
243 uint64_t start, uint64_t length) { in UpdateHashAtOffset() argument
244 if (length > package_size_ || start > package_size_ - length) { in UpdateHashAtOffset()
245 LOG(ERROR) << "Out of bound read, offset: " << start << ", size: " << length in UpdateHashAtOffset()
[all …]
Dverifier.cpp126 uint64_t length = package->GetPackageSize(); in verify_file() local
128 if (length < FOOTER_SIZE) { in verify_file()
134 if (!package->ReadFullyAtOffset(footer, FOOTER_SIZE, length - FOOTER_SIZE)) { in verify_file()
165 if (length < eocd_size) { in verify_file()
173 uint64_t signed_len = length - eocd_size + EOCD_HEADER_SIZE - 2; in verify_file()
176 if (!package->ReadFullyAtOffset(eocd, eocd_size, length - eocd_size)) { in verify_file()
249 LOG(INFO) << "signature (offset: " << std::hex << (length - signature_start) in verify_file()
Dwipe_device.cpp54 uint32_t length = entry.uncompressed_length; in GetWipePartitionList() local
55 partition_list_content = std::string(length, '\0'); in GetWipePartitionList()
57 zip, &entry, reinterpret_cast<uint8_t*>(partition_list_content.data()), length); in GetWipePartitionList()
Dinstall.cpp86 uint32_t length = entry.uncompressed_length; in ReadMetadataFromPackage() local
87 std::string metadata_string(length, '\0'); in ReadMetadataFromPackage()
89 ExtractToMemory(zip, &entry, reinterpret_cast<uint8_t*>(&metadata_string[0]), length); in ReadMetadataFromPackage()
714 if (target_token.length() > str_list.length()) { in isInStringList()
716 } else if (target_token.length() == str_list.length() || deliminator.length() == 0) { in isInStringList()
/bootable/recovery/tests/unit/
Dasn1_decoder_test.cpp37 size_t length; in TEST() local
38 ASSERT_FALSE(ctx.asn1_oid_get(&junk, &length)); in TEST()
39 ASSERT_FALSE(ctx.asn1_octet_string_get(&junk, &length)); in TEST()
61 size_t length; in TEST() local
62 ASSERT_FALSE(ptr->asn1_oid_get(&oid, &length)); in TEST()
72 size_t length; in TEST() local
73 ASSERT_TRUE(ptr->asn1_oid_get(&oid, &length)); in TEST()
74 ASSERT_EQ(1U, length); in TEST()
89 size_t length; in TEST() local
90 ASSERT_TRUE(ctx.asn1_oid_get(&oid, &length)); in TEST()
[all …]
Dsysutil_test.cpp101 ASSERT_EQ(content.size(), mapping.length); in TEST()
122 ASSERT_EQ(file_size, mapping.length); in TEST()
130 ASSERT_EQ(file_size, mapping.length); in TEST()
138 ASSERT_EQ(file_size, mapping.length); in TEST()
146 ASSERT_EQ(file_size, mapping.length); in TEST()
Duncrypt_test.cpp109 int length = static_cast<int>(message.size()); in SetupOrClearBcb() local
110 int length_out = htonl(length); in SetupOrClearBcb()
113 ASSERT_TRUE(android::base::WriteFully(sockfd, message.data(), length)) in SetupOrClearBcb()
Dzip_test.cpp37 ASSERT_EQ(0, OpenArchiveFromMemory(map.addr, map.length, zip_path.c_str(), &handle)); in TEST()
/bootable/recovery/recovery_utils/
Droots.cpp61 .length = 0, in load_volume_table()
68 << " " << entry.fs_type << " " << entry.blk_device << " " << entry.length in load_volume_table()
177 int64_t length = 0; in format_volume() local
178 if (v->length > 0) { in format_volume()
179 length = v->length; in format_volume()
180 } else if (v->length < 0 || v->key_loc == "footer") { in format_volume()
186 length = get_file_size(fd.get(), v->length ? -v->length : CRYPT_FOOTER_OFFSET); in format_volume()
187 if (length <= 0) { in format_volume()
188 LOG(ERROR) << "get_file_size: invalid size " << length << " for " << v->blk_device; in format_volume()
226 if (length != 0) { in format_volume()
[all …]
/bootable/recovery/install/include/private/
Dasn1_decoder.h25 asn1_context(const uint8_t* buffer, size_t length) : p_(buffer), length_(length), app_type_(0) {} in asn1_context() argument
32 bool asn1_oid_get(const uint8_t** oid, size_t* length);
33 bool asn1_octet_string_get(const uint8_t** octet_string, size_t* length);
/bootable/recovery/updater_sample/src/com/example/android/systemupdatersample/util/
DPayloadSpecs.java62 long extraSize = entry.getExtra() == null ? 0 : entry.getExtra().length; in forNonStreaming()
63 offset += 30 + name.length() + extraSize; in forNonStreaming()
69 long length = entry.getCompressedSize(); in forNonStreaming() local
76 payloadSize = length; in forNonStreaming()
87 offset += length; in forNonStreaming()
/bootable/recovery/minui/
Dgraphics_fbdev.cpp93 vi.bits_per_pixel, vi.red.offset, vi.red.length, vi.green.offset, vi.green.length, in Init()
94 vi.blue.offset, vi.blue.length); in Init()
/bootable/recovery/applypatch/
Dimgdiff.cpp197 static bool AlignHead(size_t* start, size_t* length) { in AlignHead() argument
200 if (*length <= residual) { in AlignHead()
201 *length = 0; in AlignHead()
207 *length -= residual; in AlignHead()
211 static bool AlignTail(size_t* start, size_t* length) { in AlignTail() argument
212 size_t residual = (*start + *length) % BLOCK_SIZE; in AlignTail()
213 if (*length <= residual) { in AlignTail()
214 *length = 0; in AlignTail()
219 *length -= residual; in AlignTail()
226 static bool RemoveUsedBlocks(size_t* start, size_t* length, const SortedRangeSet& used_ranges) { in RemoveUsedBlocks() argument
[all …]
/bootable/recovery/otautil/
Dsysutil.cpp119 length = sb.st_size; in MapFD()
178 length = block_map_data.file_size(); in MapBlockFile()
215 if (munmap(range.addr, range.length) == -1) { in ~MemMapping()
216 PLOG(ERROR) << "Failed to munmap(" << range.addr << ", " << range.length << ")"; in ~MemMapping()
/bootable/recovery/otautil/include/otautil/
Dsysutil.h90 size_t length; // length of data variable
95 size_t length; member
/bootable/recovery/uncrypt/
Duncrypt.cpp569 int length; in setup_bcb() local
570 if (!android::base::ReadFully(socket, &length, 4)) { in setup_bcb()
574 length = ntohl(length); in setup_bcb()
578 content.resize(length); in setup_bcb()
579 if (!android::base::ReadFully(socket, &content[0], length)) { in setup_bcb()
/bootable/recovery/updater_sample/src/com/example/android/systemupdatersample/
DUpdateConfig.java79 for (int i = 0; i < propertyFilesJson.length(); i++) { in fromJson()
165 return new File(mUrl.substring(7, mUrl.length())); in getUpdatePackageFile()
/bootable/recovery/updater/include/private/
Dcommands.h170 PatchInfo(size_t offset, size_t length) : offset_(offset), length_(length) {} in PatchInfo() argument
176 size_t length() const { in length() function
/bootable/recovery/updater/include/updater/
Dupdater.h69 return mapped_package_.length; in GetMappedPackageLength()
/bootable/recovery/install/include/install/
Dverifier.h74 uint64_t length) = 0;
/bootable/recovery/updater/
Dcommands.cpp248 size_t length; in Parse() local
250 !android::base::ParseUint(tokens[pos++], &length)) { in Parse()
254 patch_info = PatchInfo(offset, length); in Parse()
Dupdater.cpp49 if (int open_err = OpenArchiveFromMemory(mapped_package_.addr, mapped_package_.length, in Init()
/bootable/recovery/updater_sample/tests/src/com/example/android/systemupdatersample/util/
DPayloadSpecsTest.java86 30 + PAYLOAD_BINARY_FILE_NAME.length(), spec.getOffset()); in forNonStreaming_works()
/bootable/recovery/tools/image_generator/
DImageGenerator.java215 index + ANDROID_STRING.length()); in addLine()
371 result.put(locale, localizedText.substring(1, localizedText.length() - 1)); in readLocalizedStringFromXmls()
475 locale.length())); in encodeTextInfo()

12