From: Dmitry Belyavskiy Date: Sat, 22 Aug 2020 15:49:57 +0000 (+0300) Subject: Fix Coverity #305798 X-Git-Tag: v3.0.0~70 X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=cdd646bdac35373119c2db23e2739208ac55635d;p=openssl-gost%2Fengine.git Fix Coverity #305798 --- diff --git a/test_tlstree.c b/test_tlstree.c index 5b847f5..1c4ecb8 100644 --- a/test_tlstree.c +++ b/test_tlstree.c @@ -101,7 +101,7 @@ int main(void) int i; OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL); - + memset(data63, 0, 4096); md = EVP_get_digestbynid(NID_grasshopper_mac); @@ -126,7 +126,10 @@ int main(void) ciph = EVP_get_cipherbynid(NID_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm); enc = EVP_CIPHER_CTX_new(); - EVP_EncryptInit_ex(enc, ciph, NULL, enc_key, full_iv); + if (EVP_EncryptInit_ex(enc, ciph, NULL, enc_key, full_iv) <= 0) { + fprintf(stderr, "Internal error"); + exit(1); + } for (i = 7; i >= 0; i--) { ++seq0[i];