diff options
author | Sangyoon Jang <jeremy.jang@samsung.com> | 2024-03-20 14:55:33 +0900 |
---|---|---|
committer | Sangyoon Jang <jeremy.jang@samsung.com> | 2024-03-20 14:55:33 +0900 |
commit | 36ead41255837c331fae377286813f3b3511a88d (patch) | |
tree | 7b2e0d55583cedaec4b2639011202e9648dce844 | |
parent | 606603a5b0116575a45383ebb060bf7398bc0a34 (diff) | |
download | app-installers-36ead41255837c331fae377286813f3b3511a88d.tar.gz app-installers-36ead41255837c331fae377286813f3b3511a88d.tar.bz2 app-installers-36ead41255837c331fae377286813f3b3511a88d.zip |
Fix static analysis issues
Change-Id: Id2c82cf60202e21da11a880e0fdcd4f1cbaa00a1
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
-rw-r--r-- | src/common/certificate_validation.cc | 2 | ||||
-rw-r--r-- | src/common/signature.cc | 3 | ||||
-rw-r--r-- | src/common/step/step.h | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/common/certificate_validation.cc b/src/common/certificate_validation.cc index 4975f96e..0d7b9244 100644 --- a/src/common/certificate_validation.cc +++ b/src/common/certificate_validation.cc @@ -66,7 +66,7 @@ static bool SetAuthorCertificate(const ValidationCore::SignatureData& data, (*it)->getPublicKeyDER(&public_key, &len); std::string author_id = ci::EncodeBase64(public_key, len); - cert_info->author_id.set(author_id); + cert_info->author_id.set(std::move(author_id)); free(public_key); return SetCertificate(data, diff --git a/src/common/signature.cc b/src/common/signature.cc index 1e1f661b..2e3301ec 100644 --- a/src/common/signature.cc +++ b/src/common/signature.cc @@ -61,7 +61,8 @@ bool Signature::GetPrivilegeLevel(std::filesystem::path sig_root_path, request_type_ == ci::RequestType::ManifestPartialInstall || request_type_ == ci::RequestType::ManifestPartialUpdate))) check_reference = false; - if (!CheckSignatures(check_reference, level, sig_root_path, error_message)) + if (!CheckSignatures(check_reference, level, std::move(sig_root_path), + error_message)) return false; if (*level == PrivilegeLevel::UNTRUSTED) diff --git a/src/common/step/step.h b/src/common/step/step.h index 9e5b6af2..9b4bd48b 100644 --- a/src/common/step/step.h +++ b/src/common/step/step.h @@ -86,7 +86,8 @@ class Step { }; /** Standard constructor */ - explicit Step(InstallerContext* context) : context_(context) { } + explicit Step(InstallerContext* context) + : context_(context), on_error_(nullptr) { } /** Virtual "empty" destructor */ virtual ~Step() { } |