]> www.wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Coverity issue #300971
authorDmitry Belyavskiy <beldmit@gmail.com>
Sun, 10 May 2020 14:15:00 +0000 (17:15 +0300)
committerDmitry Belyavskiy <beldmit@gmail.com>
Sun, 10 May 2020 14:15:00 +0000 (17:15 +0300)
gost_crypt.c

index ffb577db84dbae00eee4d700dc1b11c336faf8ed..6d265a6c991964e06ddd462e7c6c03b79f570912 100644 (file)
@@ -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);