diff options
author | Rich Salz <rsalz@akamai.com> | 2016-01-29 12:09:05 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-01-30 14:37:43 -0500 |
commit | 98ab57644f44d2d83595c2d0f69138a284d6096b (patch) | |
tree | 5ec5e8ff62efd3bae592e6b59aab422ce25badfc /crypto/cryptlib.c | |
parent | c10d1bc81cb047cbd53f8cc430632b6a4a70252d (diff) |
GH102: Add volatile to CRYPTO_memcmp
Can't hurt and seems to prevent problems from some over-aggressive
(LTO?) compilers.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/cryptlib.c')
-rw-r--r-- | crypto/cryptlib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index 14a84243c6..9473799a48 100644 --- a/crypto/cryptlib.c +++ b/crypto/cryptlib.c @@ -465,11 +465,11 @@ void OpenSSLDie(const char *file, int line, const char *assertion) #endif } -int CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len) +int CRYPTO_memcmp(const volatile void *in_a, const volatile void *in_b, size_t len) { size_t i; - const unsigned char *a = in_a; - const unsigned char *b = in_b; + const volatile unsigned char *a = in_a; + const volatile unsigned char *b = in_b; unsigned char x = 0; for (i = 0; i < len; i++) |