GH102: Extra volatile avoids GCC bug
authorRich Salz <rsalz@akamai.com>
Sun, 31 Jan 2016 00:48:09 +0000 (19:48 -0500)
committerRich Salz <rsalz@openssl.org>
Sun, 31 Jan 2016 01:19:19 +0000 (20:19 -0500)
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
crypto/cryptlib.c
include/openssl/crypto.h

index 9473799a48ac5abfe07d3f85ace12df20d304483..d31734068ba85e6b198f2574972c4b81f5dd8c26 100644 (file)
@@ -465,7 +465,9 @@ void OpenSSLDie(const char *file, int line, const char *assertion)
 #endif
 }
 
-int CRYPTO_memcmp(const volatile void *in_a, const volatile void *in_b, size_t len)
+int CRYPTO_memcmp(const volatile void * volatile in_a,
+                  const volatile void * volatile in_b,
+                  size_t len)
 {
     size_t i;
     const volatile unsigned char *a = in_a;
index 024f2c9b728bcd677ecba57fbf1d4eb681057057..1251aa13d90a76ece22882d34126735bc715dc0e 100644 (file)
@@ -542,7 +542,9 @@ int OPENSSL_gmtime_diff(int *pday, int *psec,
  * into a defined order as the return value when a != b is undefined, other
  * than to be non-zero.
  */
-int CRYPTO_memcmp(const volatile void *a, const volatile void *b, size_t len);
+int CRYPTO_memcmp(const volatile void * volatile in_a,
+                  const volatile void * volatile in_b,
+                  size_t len);
 
 /* BEGIN ERROR CODES */
 /*