Fix alignment problem in serpent.c.
authorVladimir Serbinenko <phcoder@gmail.com>
Thu, 18 Apr 2013 11:22:34 +0000 (13:22 +0200)
committerWerner Koch <wk@gnupg.org>
Thu, 18 Apr 2013 12:48:30 +0000 (14:48 +0200)
commit86e72b490a5790a9c23341067c7e4d3e38be1634
tree1f2982370ffdbf040876b06133ab2cf9c4cbe97b
parent78cd0ba8a8eceee9d0b3397a2ab3bda6ba37c8a4
Fix alignment problem in serpent.c.

* cipher/serpent.c (serpent_key_prepare): Fix misaligned access.
(serpent_setkey): Likewise.
(serpent_encrypt_internal): Likewise.
(serpent_decrypt_internal): Likewise.
(serpent_encrypt): Don't put an alignment-increasing cast.
(serpent_decrypt): Likewise.
(serpent_test): Likewise.
--

This is a port of the fix for the Libgcrypt code in GRUB:
  http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/3685
GRUB is FSF copyrighted and thus we can use this code without a DCO.

Note that the above fix was not correct and failed the selftests, thus
I fixed this fix.

GnuPG-bug-id: 1384
Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit 8eab66ad6852ec985bfb1e7fec35981d5e31148a)
AUTHORS
cipher/serpent.c