From 14dc1bc6a3480f9dbb78b02cae49e457b8e270a5 Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Mon, 6 Mar 2023 16:40:21 +0000 Subject: Simplify dex::Verify call We always pass dex_file->{Begin,End} as the range, so remove the arguments and use the provided dex_file. Bug: 266950186 Test: test.py -b --host --optimizing --64 Change-Id: I2361b1b4d9c9fafd180b2cab98c272847383c361 --- libdexfile/dex/dex_file_loader.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'libdexfile/dex/dex_file_loader.cc') diff --git a/libdexfile/dex/dex_file_loader.cc b/libdexfile/dex/dex_file_loader.cc index 5d5cd4ccbe..bd5863aec4 100644 --- a/libdexfile/dex/dex_file_loader.cc +++ b/libdexfile/dex/dex_file_loader.cc @@ -380,12 +380,7 @@ std::unique_ptr DexFileLoader::OpenCommon( // NB: Dex verifier does not understand the compact dex format. if (verify && !dex_file->IsCompactDexFile()) { ScopedTrace trace(std::string("Verify dex file ") + location); - if (!dex::Verify(dex_file.get(), - dex_file->Begin(), - dex_file->Size(), - location.c_str(), - verify_checksum, - error_msg)) { + if (!dex::Verify(dex_file.get(), location.c_str(), verify_checksum, error_msg)) { if (error_code != nullptr) { *error_code = DexFileLoaderErrorCode::kVerifyError; } -- cgit v1.2.3-59-g8ed1b