summaryrefslogtreecommitdiff
path: root/cipher/rijndael.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2012-11-21 10:35:28 +0100
committerWerner Koch <wk@gnupg.org>2012-11-21 10:35:28 +0100
commita96974de734beb51a733a89b3283bcf7b433b54c (patch)
treeed1584ed59598019deab44aa2a6514b3e9aabff5 /cipher/rijndael.c
parent4b18e530f417d4af401a3fd721ad2a07e5310e3e (diff)
downloadlibgcrypt-a96974de734beb51a733a89b3283bcf7b433b54c.tar.gz
Fix segv with AES-NI on some platforms.
* cipher/rijndael.c (RIJNDAEL_context): Align on 16 bytes. -- The trigger for this problem is the allocation of the context in the selftest functions. The other code paths use a 16 byte alignment anyway by means of the allocation of the context in cipher.c Thanks to Gentoo hacker Joakim Tjernlund for figuring out the reason of this problem. GnuPG-bug-id: 1452
Diffstat (limited to 'cipher/rijndael.c')
-rw-r--r--cipher/rijndael.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cipher/rijndael.c b/cipher/rijndael.c
index d9a95cb7..a2aedf01 100644
--- a/cipher/rijndael.c
+++ b/cipher/rijndael.c
@@ -126,7 +126,7 @@ typedef struct
#ifdef USE_AESNI
int use_aesni; /* AES-NI shall be used. */
#endif /*USE_AESNI*/
-} RIJNDAEL_context;
+} RIJNDAEL_context ATTR_ALIGNED_16;
/* Macros defining alias for the keyschedules. */
#define keyschenc u1.keyschedule