Check i before r[i].
[openssl.git] / fips / fips_premain.c
index c94568c8c7cda8b68582d8ac6bdb4b735e7cc5b1..7dc52460069f76c14c7f41e8e77b722b01963b08 100644 (file)
@@ -7,7 +7,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#if defined(__unix) || defined(__unix__) || defined(__vxworks) || defined(__ANDROID__)
+#if defined(__unix) || defined(__unix__) || defined(__vxworks) || defined(__ANDROID__) || defined(__APPLE__)
 #include <unistd.h>
 #endif
 
 #define HMAC_SHA1_SIG "?have to make sure this string is unique"
 #endif
 
+#if defined(_MSC_VER)
+# pragma const_seg("fipsro")
+# pragma const_seg()
+  __declspec(allocate("fipsro"))
+#endif
 static const unsigned char FINGERPRINT_ascii_value[41] = HMAC_SHA1_SIG;
 
 #define atox(c) ((c)>='a'?((c)-'a'+10):((c)>='A'?(c)-'A'+10:(c)-'0'))