Home
last modified time | relevance | path

Searched refs:length (Results 1 – 25 of 29) 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.cpp54 uint64_t length) override;
94 uint64_t length) override;
141 package_size_ = map_->length; in MemoryPackage()
171 uint64_t start, uint64_t length) { in UpdateHashAtOffset() argument
172 if (length > package_size_ || start > package_size_ - length) { in UpdateHashAtOffset()
173 LOG(ERROR) << "Out of bound read, offset: " << start << ", size: " << length in UpdateHashAtOffset()
179 hasher(addr_ + start, length); in UpdateHashAtOffset()
227 uint64_t start, uint64_t length) { in UpdateHashAtOffset() argument
228 if (length > package_size_ || start > package_size_ - length) { in UpdateHashAtOffset()
229 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()
Dinstall.cpp83 uint32_t length = entry.uncompressed_length; in ReadMetadataFromPackage() local
84 std::string metadata_string(length, '\0'); in ReadMetadataFromPackage()
86 ExtractToMemory(zip, &entry, reinterpret_cast<uint8_t*>(&metadata_string[0]), length); in ReadMetadataFromPackage()
/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()
Dzip_test.cpp37 ASSERT_EQ(0, OpenArchiveFromMemory(map.addr, map.length, zip_path.c_str(), &handle)); in TEST()
/bootable/recovery/otautil/
Droots.cpp61 .mount_point = "/tmp", .fs_type = "ramdisk", .blk_device = "ramdisk", .length = 0 }); in load_volume_table()
67 << " " << entry.fs_type << " " << entry.blk_device << " " << entry.length in load_volume_table()
168 int64_t length = 0; in format_volume() local
169 if (v->length > 0) { in format_volume()
170 length = v->length; in format_volume()
171 } else if (v->length < 0 || v->key_loc == "footer") { in format_volume()
177 length = get_file_size(fd.get(), v->length ? -v->length : CRYPT_FOOTER_OFFSET); in format_volume()
178 if (length <= 0) { in format_volume()
179 LOG(ERROR) << "get_file_size: invalid size " << length << " for " << v->blk_device; in format_volume()
202 if (length != 0) { in format_volume()
[all …]
Dsysutil.cpp114 length = sb.st_size; in MapFD()
173 length = block_map_data.file_size(); in MapBlockFile()
210 if (munmap(range.addr, range.length) == -1) { in ~MemMapping()
211 PLOG(ERROR) << "Failed to munmap(" << range.addr << ", " << range.length << ")"; in ~MemMapping()
/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/misc_writer/
Dmisc_writer.cpp35 auto length = hex_string.size(); in ParseHexString() local
36 if (length % 2 != 0 || length == 0) { in ParseHexString()
40 std::vector<uint8_t> result(length / 2); in ParseHexString()
41 for (size_t i = 0; i < length / 2; i++) { in ParseHexString()
/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/otautil/include/otautil/
Dsysutil.h90 size_t length; // length of data variable
95 size_t length; member
/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/tests/component/
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()
/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/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/
Dupdater.cpp97 int open_err = OpenArchiveFromMemory(map.addr, map.length, argv[3], &za); in main()
157 updater_info.package_zip_len = map.length; in main()
Dcommands.cpp249 size_t length; in Parse() local
251 !android::base::ParseUint(tokens[pos++], &length)) { in Parse()
255 patch_info = PatchInfo(offset, length); in Parse()
/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/install/include/install/
Dverifier.h74 uint64_t length) = 0;
/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_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()
/bootable/recovery/
Drecovery.cpp320 uint32_t length = entry.uncompressed_length; in GetWipePartitionList() local
321 partition_list_content = std::string(length, '\0'); in GetWipePartitionList()
323 zip, &entry, reinterpret_cast<uint8_t*>(partition_list_content.data()), length); in GetWipePartitionList()

12