CID : 1222319, 1222330 : Dereference null return
Change-Id: I649aa4a72932664805bfea7acda692725abba088
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
#else // OpenSSL 1.1.1
EVP_MD_CTX *ctx;
ctx = EVP_MD_CTX_new();
+ if (ctx == NULL) {
+ DEBUG_ERR_MSG("ctx is NULL");
+ return -1;
+ }
#endif
EVP_PKEY_CTX *pctx = NULL;
#else // OpenSSL 1.1.1
EVP_MD_CTX *ctx;
ctx = EVP_MD_CTX_new();
+ if (ctx == NULL) {
+ DEBUG_ERR_MSG("ctx is NULL");
+ return -1;
+ }
#endif
EVP_PKEY_CTX *pctx = NULL;
#else // OpenSSL 1.1.1
EVP_MD_CTX *mdCtx;
mdCtx = EVP_MD_CTX_new();
+ if (mdCtx == NULL) {
+ DEBUG_ERR_MSG("mdCtx is NULL");
+ return false;
+ }
#endif
unsigned int resultLen = 0;