From: Bernd Edlinger Date: Fri, 16 Dec 2022 18:30:29 +0000 (+0100) Subject: Fix a logic flaw in test_mod_exp_zero X-Git-Tag: OpenSSL_1_1_1t~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed8af0502167c80ba70522d88e719f874e24ebfd;p=thirdparty%2Fopenssl.git Fix a logic flaw in test_mod_exp_zero Due to the logic flaw, possible test failures in this test case might be ignored. Reviewed-by: Shane Lontis Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/19929) (cherry picked from commit 42061268ee8f9ae0555d522870740fc91b744f4f) --- diff --git a/test/exptest.c b/test/exptest.c index cde4d6bc454..a327773ec43 100644 --- a/test/exptest.c +++ b/test/exptest.c @@ -49,7 +49,7 @@ static int test_mod_exp_zero(void) BIGNUM *r = NULL; BN_ULONG one_word = 1; BN_CTX *ctx = BN_CTX_new(); - int ret = 1, failed = 0; + int ret = 0, failed = 0; if (!TEST_ptr(m = BN_new()) || !TEST_ptr(a = BN_new())