summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-09-14 00:45:34 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-09-14 00:45:34 +0200
commit914f39d2d35fa58ad83103e1005637f2a34615d3 (patch)
tree3251273048cdcdd6ff499ab22c8862c771bfa4fe
parentMerge "Have gr_init_font alloc memory for the font" into cw-f-dev (diff)
parentCheck corruption when reading uncrypt_status file (diff)
downloadandroid_bootable_recovery-914f39d2d35fa58ad83103e1005637f2a34615d3.tar
android_bootable_recovery-914f39d2d35fa58ad83103e1005637f2a34615d3.tar.gz
android_bootable_recovery-914f39d2d35fa58ad83103e1005637f2a34615d3.tar.bz2
android_bootable_recovery-914f39d2d35fa58ad83103e1005637f2a34615d3.tar.lz
android_bootable_recovery-914f39d2d35fa58ad83103e1005637f2a34615d3.tar.xz
android_bootable_recovery-914f39d2d35fa58ad83103e1005637f2a34615d3.tar.zst
android_bootable_recovery-914f39d2d35fa58ad83103e1005637f2a34615d3.zip
Diffstat (limited to '')
-rw-r--r--install.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/install.cpp b/install.cpp
index 9227d5895..209300e89 100644
--- a/install.cpp
+++ b/install.cpp
@@ -548,6 +548,8 @@ install_package(const char* path, bool* wipe_cache, const char* install_file,
std::string uncrypt_status;
if (!android::base::ReadFileToString(UNCRYPT_STATUS, &uncrypt_status)) {
PLOG(WARNING) << "failed to read uncrypt status";
+ } else if (!android::base::StartsWith(uncrypt_status, "uncrypt_time:")) {
+ PLOG(WARNING) << "corrupted uncrypt_status: " << uncrypt_status;
} else {
fprintf(install_log, "%s\n", android::base::Trim(uncrypt_status).c_str());
}