Fix input value of fts_open in key-manager-util.cpp
authoryuseok.jeon <yuseok.jeon@samsung.com>
Fri, 20 Jun 2014 09:27:51 +0000 (18:27 +0900)
committerBartlomiej Grzelewski <b.grzelewski@samsung.com>
Fri, 12 Sep 2014 12:58:32 +0000 (14:58 +0200)
Signed-off-by: yuseok.jeon <yuseok.jeon@samsung.com>
src/manager/main/key-manager-util.cpp

index ee57ac7..ed21b46 100644 (file)
@@ -137,10 +137,13 @@ STACK_OF(X509) *loadSystemCerts( const char * dirpath) {
     FTSENT *ftsent;
     char tmp[10];
     STACK_OF(X509) *systemCerts = sk_X509_new_null();
-
+    const char *dir_path[2];
     X509 *cert;
 
-    if (NULL == (fts = fts_open((char * const *) &dirpath, FTS_LOGICAL, NULL))) {
+    dir_path[0] = dirpath;
+    dir_path[1] = NULL;
+
+    if (NULL == (fts = fts_open((char * const *) dir_path, FTS_LOGICAL, NULL))) {
         printf("Fail to open directories. dir=%s \n", dirpath);
         return NULL;
     }