diff options
author | Dmitry Belyavskiy <beldmit@gmail.com> | 2020-05-10 17:15:00 +0300 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@gmail.com> | 2020-05-10 17:15:00 +0300 |
commit | 4d1280e1054ce758d19be71f785ec3aff8573b4c (patch) | |
tree | 76afbc1237d09e8f957dee3378a86a29c8bb657a /gost_crypt.c | |
parent | 9cf021b8f3cc7b0f49ecd2f165bd1864903c90d0 (diff) | |
download | gost-engine-4d1280e1054ce758d19be71f785ec3aff8573b4c.zip gost-engine-4d1280e1054ce758d19be71f785ec3aff8573b4c.tar.gz gost-engine-4d1280e1054ce758d19be71f785ec3aff8573b4c.tar.bz2 |
Coverity issue #300971
Diffstat (limited to 'gost_crypt.c')
-rw-r--r-- | gost_crypt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gost_crypt.c b/gost_crypt.c index ffb577d..6d265a6 100644 --- a/gost_crypt.c +++ b/gost_crypt.c @@ -866,6 +866,9 @@ static int magma_cipher_do_ctr_acpkm_omac(EVP_CIPHER_CTX *ctx, unsigned char *ou if (in == NULL && inl == 0) /* Final call */ return gost2015_final_call(ctx, c->omac_ctx, MAGMA_MAC_MAX_SIZE, c->tag, magma_cipher_do_ctr); + if (in == NULL) + return -1; + /* As in and out can be the same pointer, process unencrypted here */ if (EVP_CIPHER_CTX_encrypting(ctx)) EVP_DigestSignUpdate(c->omac_ctx, in, inl); |