From ffb81114e989bdf80c7d3bd47f9e49665925da46 Mon Sep 17 00:00:00 2001 From: Dmitry Belyavskiy Date: Wed, 6 May 2020 18:12:10 +0300 Subject: [PATCH] Fix Coverity #300461 --- benchmark/sign.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) -- 2.39.5