From: Dmitry Belyavskiy Date: Thu, 16 Feb 2023 10:23:09 +0000 (+0100) Subject: Avoid erroneous diagnostics in speed measuring X-Git-Tag: openssl-3.2.0-alpha1~1167 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07626ea9e5400bd857a58a4da06756748701e9ed;p=thirdparty%2Fopenssl.git Avoid erroneous diagnostics in speed measuring Fixes #20291 Reviewed-by: Tom Cosgrove Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/20306) --- diff --git a/apps/speed.c b/apps/speed.c index b647e2022b4..5d4b389da69 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -774,7 +774,7 @@ static int EVP_Update_loop(void *args) else rc = EVP_EncryptFinal_ex(ctx, buf, &outl); - if (rc <= 1) + if (rc == 0) BIO_printf(bio_err, "Error finalizing cipher loop\n"); return count; } @@ -816,7 +816,7 @@ static int EVP_Update_loop_ccm(void *args) else final = EVP_EncryptFinal_ex(ctx, buf, &outl); - if (final <= 1) + if (final == 0) BIO_printf(bio_err, "Error finalizing ccm loop\n"); return realcount; }