Make sure not to read beyond end of buffer
[oweals/openssl.git] / crypto / rsa / rsa_pss.c
index 2815628f5f79d6033a4494d32977aa47dbe3262e..e19d18c5b9376543c14c1b814f192966d7a55bd0 100644 (file)
 #include <openssl/rand.h>
 #include <openssl/sha.h>
 
-const static unsigned char zeroes[] = {0,0,0,0,0,0,0,0};
+static const unsigned char zeroes[] = {0,0,0,0,0,0,0,0};
+
+#if defined(_MSC_VER) && defined(_ARM_)
+#pragma optimize("g", off)
+#endif
 
 int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
                        const EVP_MD *Hash, const unsigned char *EM, int sLen)
@@ -259,3 +263,7 @@ int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
        return ret;
 
        }
+
+#if defined(_MSC_VER)
+#pragma optimize("",on)
+#endif