diff options
author | Dongsun Lee <ds73.lee@samsung.com> | 2018-04-09 09:56:54 +0900 |
---|---|---|
committer | Pawel Kowalski <p.kowalski2@partner.samsung.com> | 2018-12-21 07:52:47 +0100 |
commit | 52df2ea44bc6009ae21019cc12c36ac3c3ecc13a (patch) | |
tree | 6190aaa37ae62869b2bd6c51a8f6d9a96e971cea | |
parent | 5158a47a2118543cdc13c76a37c8c587940c1f5e (diff) | |
download | cert-svc-accepted/tizen_4.0_unified.tar.gz cert-svc-accepted/tizen_4.0_unified.tar.bz2 cert-svc-accepted/tizen_4.0_unified.zip |
Fix Coverity defectssubmit/tizen_4.0/20181221.121349accepted/tizen/4.0/unified/20181226.234144tizen_4.0accepted/tizen_4.0_unified
- 105718: Unchecked return value
Change-Id: Id44b5382efac170ead4db403397262e59a2daa12
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
-rw-r--r-- | src/vcore/api.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vcore/api.cpp b/src/vcore/api.cpp index 58fc882..7ecdb2a 100644 --- a/src/vcore/api.cpp +++ b/src/vcore/api.cpp @@ -791,7 +791,11 @@ err: } X509_STORE_CTX context; - X509_STORE_CTX_init(&context, store, cert, ustore); + if(!X509_STORE_CTX_init(&context, store, cert, ustore)) { + X509_STORE_free(store); + sk_X509_free(ustore); + return CERTSVC_FAIL; + } int result = X509_verify_cert(&context); if (result == 1 && checkCaFlag) { // check strictly |