From: Dmitry Belyavskiy Date: Sun, 10 May 2020 14:15:00 +0000 (+0300) Subject: Coverity issue #300971 X-Git-Tag: v3.0.0~123 X-Git-Url: http://www.wagner.pp.ru/gitweb/?p=openssl-gost%2Fengine.git;a=commitdiff_plain;h=4d1280e1054ce758d19be71f785ec3aff8573b4c Coverity issue #300971 --- 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);