diff options
author | Werner Koch <wk@gnupg.org> | 2012-11-21 10:35:28 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2012-11-21 10:38:06 +0100 |
commit | d30c86465fef9531766fd7c124a5d87d7645850e (patch) | |
tree | 965d3dba3cd0e7e9701cd73fdf29a98c09afc4d8 | |
parent | 322a9b53e6f7e71aca46a45b12b036ecf46be8ee (diff) | |
download | libgcrypt-d30c86465fef9531766fd7c124a5d87d7645850e.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
-rw-r--r-- | cipher/rijndael.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cipher/rijndael.c b/cipher/rijndael.c index 2df8ea9a..92fa31d3 100644 --- a/cipher/rijndael.c +++ b/cipher/rijndael.c @@ -124,7 +124,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 |