From fe278afb18729fdc7c57a48ed4b2081f3cd64e39 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sat, 1 Jul 2017 01:43:15 +0200 Subject: Fix crash on machines without SSSE3 support in CPU by correctly checking for SSSE3 before using SHA-512 SSE2 assembly which uses PSHUFB instruction. --- src/Crypto/Sha2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Crypto/Sha2.c') diff --git a/src/Crypto/Sha2.c b/src/Crypto/Sha2.c index fc1d0aec..4c00762b 100644 --- a/src/Crypto/Sha2.c +++ b/src/Crypto/Sha2.c @@ -217,7 +217,7 @@ void sha512_begin(sha512_ctx* ctx) #endif #if CRYPTOPP_BOOL_X64 || ((CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32) && !defined (TC_MACOSX)) - if (HasSSE2() && HasMMX()) + if (HasSSSE3() && HasMMX()) transfunc = SSE2Transform; else #endif -- cgit v1.2.3