summaryrefslogtreecommitdiff
path: root/libdexfile/dex/dex_file_loader.cc
diff options
context:
space:
mode:
author David Srbecky <dsrbecky@google.com> 2023-10-13 16:32:09 +0000
committer David Srbecky <dsrbecky@google.com> 2023-10-16 12:40:31 +0000
commit4b7aef13e87be3e35de747fb10845057f9ddb712 (patch)
tree5e8a2311d2055d7556d7db25b1363db88b5ebff2 /libdexfile/dex/dex_file_loader.cc
parenta51744169fcc555158068183eae6e1a88483592a (diff)
Revert^2 "Remove size argument from DexFile constructors."
This reverts commit 26b99c916496abf14a2fd87290720742328462fa. Reason for revert: Reland Change-Id: Ifc9418a5c76d9d4252c661efe7c13d45ae8810a2
Diffstat (limited to 'libdexfile/dex/dex_file_loader.cc')
-rw-r--r--libdexfile/dex/dex_file_loader.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdexfile/dex/dex_file_loader.cc b/libdexfile/dex/dex_file_loader.cc
index e0d4c77eea..996204f365 100644
--- a/libdexfile/dex/dex_file_loader.cc
+++ b/libdexfile/dex/dex_file_loader.cc
@@ -435,10 +435,10 @@ std::unique_ptr<DexFile> DexFileLoader::OpenCommon(std::shared_ptr<DexFileContai
auto header = reinterpret_cast<const DexFile::Header*>(base);
if (size >= sizeof(StandardDexFile::Header) && StandardDexFile::IsMagicValid(base)) {
uint32_t checksum = location_checksum.value_or(header->checksum_);
- dex_file.reset(new StandardDexFile(base, size, location, checksum, oat_dex_file, container));
+ dex_file.reset(new StandardDexFile(base, location, checksum, oat_dex_file, container));
} else if (size >= sizeof(CompactDexFile::Header) && CompactDexFile::IsMagicValid(base)) {
uint32_t checksum = location_checksum.value_or(header->checksum_);
- dex_file.reset(new CompactDexFile(base, size, location, checksum, oat_dex_file, container));
+ dex_file.reset(new CompactDexFile(base, location, checksum, oat_dex_file, container));
} else {
*error_msg = StringPrintf("Invalid or truncated dex file '%s'", location.c_str());
}