X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_crypt.c;h=2bede853fd617919f4d83bb239b0f9ffe1ae8692;hb=69040682b1d04049668bb63712458f28a5c448d4;hp=33dc668cba088cbf88fa1053d432bf835f7390a5;hpb=491b0c7c15e5a343cadabdf9cb7560956c9bb077;p=openssl-gost%2Fengine.git diff --git a/gost_crypt.c b/gost_crypt.c index 33dc668..2bede85 100644 --- a/gost_crypt.c +++ b/gost_crypt.c @@ -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);