Fix crash issue 75/182075/1
authorJunghyun Yeon <jungh.yeon@samsung.com>
Wed, 20 Jun 2018 07:30:11 +0000 (16:30 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Wed, 20 Jun 2018 07:30:11 +0000 (16:30 +0900)
- Manifest could be null when recover pkg.

Change-Id: I2ad4b86cc8fe7924bedf169cbce93179af3e5b4f
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/common/step/security/step_register_trust_anchor.cc

index 74d92cb..c9986e6 100644 (file)
@@ -117,6 +117,9 @@ Step::Status StepRegisterTrustAnchor::process() {
 
 Step::Status StepRegisterTrustAnchor::undo() {
   manifest_x* manifest = context_->manifest_data.get();
+  if (!manifest)
+    return Step::Status::SECURITY_ERROR;
+
   if (!manifest->use_system_certs)
     return Step::Status::OK;