]> www.wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Merge branch 'master' of https://github.com/gost-engine/engine
authorDmitry Belyavskiy <beldmit@gmail.com>
Sun, 10 May 2020 14:15:45 +0000 (17:15 +0300)
committerDmitry Belyavskiy <beldmit@gmail.com>
Sun, 10 May 2020 14:15:45 +0000 (17:15 +0300)
gost_crypt.c

index 33dc668cba088cbf88fa1053d432bf835f7390a5..2bede853fd617919f4d83bb239b0f9ffe1ae8692 100644 (file)
@@ -867,6 +867,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);