diff options
author | Tom Cosgrove <tom.cosgrove@arm.com> | 2021-05-26 16:46:00 +0100 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-05-28 10:28:29 +1000 |
commit | bb97dc508f85c729a0e5ac793557067016f879e5 (patch) | |
tree | 2e6dee1ea478464f83ea7e5a0fa15f7524917c6d | |
parent | 365d207faa9245bf55879595ee6e7f63da84610d (diff) |
Initialise OPENSSL_armcap_P to 0 before setting it based on capabilities, not after
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15486)
-rw-r--r-- | crypto/armcap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/armcap.c b/crypto/armcap.c index 28cadfbb2e..43438e0aa4 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); |