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 74d92cbca1ac396fdede1358e2159813d69f0a65..c9986e6f57d8c173958360491c08188b10db8c99 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;