From 026eb807af7b44e382bb4180a1323c832759c086 Mon Sep 17 00:00:00 2001
From: "Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics"
Date: Wed, 24 Mar 2021 09:09:17 +0100
Subject: [PATCH] [Archive] Fixed Coverity issue
Issue id: 1218132
[Verification]
Code compiles, TCT passrate 100%.
Coverity showed no issues:
https://analysishub.sec.samsung.net/service/analyses/418348
Change-Id: I5d28891a7b2c3b42237c661474ea88d00e028184
---
src/archive/archive_utils.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/archive/archive_utils.cc b/src/archive/archive_utils.cc
index ec6b564c..f54162be 100644
--- a/src/archive/archive_utils.cc
+++ b/src/archive/archive_utils.cc
@@ -271,7 +271,7 @@ bool pathTargetsDirectoryOutsideDestination(const std::string& targetEntryPath,
std::string normalizedPath = normalizePath(destinationPath, targetEntryPath);
- if (!normalizedPath.rfind(destinationPath, 0) == 0) {
+ if (normalizedPath.rfind(destinationPath, 0) != 0) {
LoggerE("Destination outside of allowed directory: %s", normalizedPath.c_str());
return true;
}
--
2.34.1