From: Tom Cosgrove Date: Wed, 26 May 2021 15:46:00 +0000 (+0100) Subject: Initialise OPENSSL_armcap_P to 0 before setting it based on capabilities, not after X-Git-Tag: openssl-3.0.0-beta1~340 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bb97dc508f85c729a0e5ac793557067016f879e5;p=thirdparty%2Fopenssl.git Initialise OPENSSL_armcap_P to 0 before setting it based on capabilities, not after Signed-off-by: Tom Cosgrove Reviewed-by: Tomas Mraz Reviewed-by: Shane Lontis Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/15486) --- diff --git a/crypto/armcap.c b/crypto/armcap.c index 28cadfbb2ec..43438e0aa4f 100644 --- a/crypto/armcap.c +++ b/crypto/armcap.c @@ -133,6 +133,8 @@ void OPENSSL_cpuid_setup(void) return; trigger = 1; + OPENSSL_armcap_P = 0; + if ((e = getenv("OPENSSL_armcap"))) { OPENSSL_armcap_P = (unsigned int)strtoul(e, NULL, 0); return; @@ -166,8 +168,6 @@ void OPENSSL_cpuid_setup(void) # endif # endif - OPENSSL_armcap_P = 0; - # ifdef OSSL_IMPLEMENT_GETAUXVAL if (getauxval(HWCAP) & HWCAP_NEON) { unsigned long hwcap = getauxval(HWCAP_CE);