Hotfix: path concatenation with '/' 36/56136/1 accepted/tizen/mobile/20160105.044548 accepted/tizen/tv/20160105.044612 accepted/tizen/wearable/20160105.044640 submit/tizen/20160105.010511
authorKyungwook Tak <k.tak@samsung.com>
Tue, 5 Jan 2016 00:36:57 +0000 (09:36 +0900)
committerKyungwook Tak <k.tak@samsung.com>
Tue, 5 Jan 2016 00:37:35 +0000 (09:37 +0900)
Change-Id: I34980671a799696664bce719fff98b502366944a
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
vcore/vcore/CertificateCollection.cpp

index ad485a6..61040fd 100644 (file)
@@ -93,17 +93,21 @@ CertificatePtr searchCert(const std::string &dir, const CertificatePtr &certPtr,
                        if (dirp->d_type == DT_DIR)
                                continue;
 
+                       std::string candidatePath(dir);
+                       candidatePath += "/";
+                       candidatePath += dirp->d_name;
+
                        if (withHash) {
                                if (!isHashMatchedName(dirp->d_name, hash))
                                        continue;
                        } else {
-                               if (!isHashMatchedFile(dir + dirp->d_name, hash))
+                               if (!isHashMatchedFile(candidatePath, hash))
                                        continue;
                        }
 
-                       LogDebug("Found hash matched file! : " << (dir + dirp->d_name));
+                       LogDebug("Found hash matched file! : " << candidatePath);
 
-                       CertificatePtr candidate = Certificate::createFromFile(dir + dirp->d_name);
+                       CertificatePtr candidate = Certificate::createFromFile(candidatePath);
                        if (candidate->getOneLine().compare(certPtr->getOneLine(Certificate::FIELD_ISSUER)) != 0)
                                continue;