aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2017-03-20 19:09:13 -0500
committerTao Bao2017-03-21 00:13:56 -0500
commit76fdb2419bfec0e747db2530379484a3dc571f34 (patch)
treeaba97506271d30aad9c52d438caf0f83fd084dad /install.cpp
parent110102f37e76c2630ff510dfc1734478a2d81206 (diff)
downloadplatform-bootable-recovery-76fdb2419bfec0e747db2530379484a3dc571f34.tar.gz
platform-bootable-recovery-76fdb2419bfec0e747db2530379484a3dc571f34.tar.xz
platform-bootable-recovery-76fdb2419bfec0e747db2530379484a3dc571f34.zip
verify_file: Add constness to a few addresses.
We should not touch any data while verifying packages (or parsing the in-memory ASN.1 structures). Test: mmma bootable/recovery Test: recovery_component_test passes. Test: recovery_unit_test passes. Change-Id: Ie990662c6451ec066a1807b3081c9296afbdb0bf
Diffstat (limited to 'install.cpp')
-rw-r--r--install.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/install.cpp b/install.cpp
index 9123fc27..db8fb97d 100644
--- a/install.cpp
+++ b/install.cpp
@@ -589,7 +589,7 @@ bool verify_package(const unsigned char* package_data, size_t package_size) {
589 // Verify package. 589 // Verify package.
590 ui->Print("Verifying update package...\n"); 590 ui->Print("Verifying update package...\n");
591 auto t0 = std::chrono::system_clock::now(); 591 auto t0 = std::chrono::system_clock::now();
592 int err = verify_file(const_cast<unsigned char*>(package_data), package_size, loadedKeys, 592 int err = verify_file(package_data, package_size, loadedKeys,
593 std::bind(&RecoveryUI::SetProgress, ui, std::placeholders::_1)); 593 std::bind(&RecoveryUI::SetProgress, ui, std::placeholders::_1));
594 std::chrono::duration<double> duration = std::chrono::system_clock::now() - t0; 594 std::chrono::duration<double> duration = std::chrono::system_clock::now() - t0;
595 ui->Print("Update package verification took %.1f s (result %d).\n", duration.count(), err); 595 ui->Print("Update package verification took %.1f s (result %d).\n", duration.count(), err);