VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto/SerpentFast.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2017-05-22 00:41:56 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-05-22 00:43:29 +0200
commit7c78c4f4ac7be0116f48e2609e49a0d7d9458073 (patch)
treeb4773b0e0195aef4577014d5c46f729098e9634f /src/Crypto/SerpentFast.c
parente484d0caaeca39b526b2d8df99ed712782a095ab (diff)
downloadVeraCrypt-7c78c4f4ac7be0116f48e2609e49a0d7d9458073.tar.gz
VeraCrypt-7c78c4f4ac7be0116f48e2609e49a0d7d9458073.zip
Windows Driver: fix "__chkstk" link error in debug build caused by some crypto functions using too much stack space for local variables.
Diffstat (limited to 'src/Crypto/SerpentFast.c')
-rw-r--r--src/Crypto/SerpentFast.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Crypto/SerpentFast.c b/src/Crypto/SerpentFast.c
index cb143262..3358db13 100644
--- a/src/Crypto/SerpentFast.c
+++ b/src/Crypto/SerpentFast.c
@@ -80,7 +80,7 @@ void serpent_encrypt_blocks(const unsigned __int8* in, unsigned __int8* out, siz
unsigned __int32 B0, B1, B2, B3;
unsigned __int32* round_key = ((unsigned __int32*) ks) + 8;
size_t i;
-#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
+#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && (!defined (DEBUG) || !defined (TC_WINDOWS_DRIVER))
if(HasSSE2() && (blocks >= 4))
{
while(blocks >= 4)
@@ -159,7 +159,7 @@ void serpent_decrypt_blocks(const unsigned __int8* in, unsigned __int8* out, siz
unsigned __int32 B0, B1, B2, B3;
unsigned __int32* round_key = ((unsigned __int32*) ks) + 8;
size_t i;
-#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
+#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && (!defined (DEBUG) || !defined (TC_WINDOWS_DRIVER))
if(HasSSE2() && (blocks >= 4))
{
while(blocks >= 4)