From: Dmitry Belyavskiy Date: Wed, 6 May 2020 15:12:10 +0000 (+0300) Subject: Fix Coverity #300461 X-Git-Tag: v3.0.0~153 X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=ffb81114e989bdf80c7d3bd47f9e49665925da46;p=openssl-gost%2Fengine.git Fix Coverity #300461 --- diff --git a/benchmark/sign.c b/benchmark/sign.c index 765b9f0..5c53df7 100644 --- a/benchmark/sign.c +++ b/benchmark/sign.c @@ -153,8 +153,8 @@ int main(int argc, char **argv) if (pass == 0) { /* sign */ for (i = 0; i < cycles; i++) { EVP_SignInit(md_ctx, mdtype); - EVP_SignUpdate(md_ctx, data, data_len); - err = EVP_SignFinal(md_ctx, &sigbuf[siglen * i], + err = EVP_SignUpdate(md_ctx, data, data_len) + && EVP_SignFinal(md_ctx, &sigbuf[siglen * i], (unsigned int *)&siglen, pkey); if (err != 1) printf("!"); @@ -163,8 +163,8 @@ int main(int argc, char **argv) } else { /* verify */ for (i = 0; i < cycles; i++) { EVP_VerifyInit(md_ctx, mdtype); - EVP_VerifyUpdate(md_ctx, data, data_len); - err = EVP_VerifyFinal(md_ctx, &sigbuf[siglen * i], + err = EVP_VerifyUpdate(md_ctx, data, data_len) + && EVP_VerifyFinal(md_ctx, &sigbuf[siglen * i], siglen, pkey); EVP_MD_CTX_reset(md_ctx); if (err != 1)