Fix prevent issue #48261
authorso.yu <so.yu@samsung.com>
Fri, 5 Apr 2013 14:18:50 +0000 (23:18 +0900)
committerso.yu <so.yu@samsung.com>
Fri, 5 Apr 2013 14:22:18 +0000 (23:22 +0900)
Change-Id: I0f146e23153aea9d78ecdab73af729cbcd77ab8e
Signed-off-by: so.yu <so.yu@samsung.com>
vcore/src/vcore/api.cpp

index a9843f4..297395b 100644 (file)
@@ -905,7 +905,10 @@ public:
                 sk_X509_free(ustore);
                 return CERTSVC_WRONG_ARGUMENT;
             }
-            sk_X509_push(ustore, iter->second->getX509());
+            if (sk_X509_push(ustore, iter->second->getX509()) == 0)
+            {
+                break;
+            }
         }
         X509_STORE_CTX context;
         X509_STORE_CTX_init(&context, store, cert, ustore);