aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Chikunov <vt@altlinux.org>2019-09-26 01:57:32 +0300
committerVitaly Chikunov <vt@altlinux.org>2019-09-26 02:22:57 +0300
commit83ede985968783114a08745293ba60db7a14b6c5 (patch)
treea2f27c8e3448ccb829dd47e7b49982a5ef34e86f
parentd77dbaa7d700d2b3d5b93d605ac047b04d062ad4 (diff)
downloadgost-engine-83ede985968783114a08745293ba60db7a14b6c5.zip
gost-engine-83ede985968783114a08745293ba60db7a14b6c5.tar.gz
gost-engine-83ede985968783114a08745293ba60db7a14b6c5.tar.bz2
test_grasshopper: Fix CIDs 253281, 253280, 253279, 253275
Unchecked return value (CHECKED_RETURN) Some fixes for Coverity Scan from issue #174.
-rw-r--r--test_grasshopper.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test_grasshopper.c b/test_grasshopper.c
index 3fb8e35..f11f049 100644
--- a/test_grasshopper.c
+++ b/test_grasshopper.c
@@ -299,8 +299,8 @@ static int test_stream(const EVP_CIPHER *type, const char *name,
int i;
EVP_CIPHER_CTX_init(ctx);
- EVP_CipherInit_ex(ctx, type, NULL, K, iv, 1);
- EVP_CIPHER_CTX_set_padding(ctx, 0);
+ T(EVP_CipherInit_ex(ctx, type, NULL, K, iv, 1));
+ T(EVP_CIPHER_CTX_set_padding(ctx, 0));
memset(c, 0xff, sizeof(c));
if (acpkm)
T(EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_KEY_MESH, acpkm, NULL));
@@ -309,11 +309,11 @@ static int test_stream(const EVP_CIPHER *type, const char *name,
sz = size - i;
else
sz = z;
- EVP_CipherUpdate(ctx, c + i, &outlen, pt + i, sz);
+ T(EVP_CipherUpdate(ctx, c + i, &outlen, pt + i, sz));
OPENSSL_assert(outlen == sz);
}
outlen = i - z + sz;
- EVP_CipherFinal_ex(ctx, c + outlen, &tmplen);
+ T(EVP_CipherFinal_ex(ctx, c + outlen, &tmplen));
EVP_CIPHER_CTX_cleanup(ctx);
test = outlen != size || memcmp(c, exp, size);