Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40bae5e1 authored by Tianjie Xu's avatar Tianjie Xu Committed by android-build-merger
Browse files

Merge "Check corruption when reading uncrypt_status file"

am: 3cf815a6

Change-Id: Ic7404abd3026a8faffaac14a20c90ebf2ef10106
parents 6048138e 3cf815a6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -392,6 +392,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());
            }