]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix an alignment issue in our extensions to ed25519_donna
authorNick Mathewson <nickm@torproject.org>
Fri, 4 Sep 2015 13:30:59 +0000 (09:30 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 4 Sep 2015 13:30:59 +0000 (09:30 -0400)
Apparently this only happens with clang (or with some particular
clang versions), and only on i386.

Fixes 16970; bug not in any released Tor.

Found by Teor; fix from Yawning.

src/ext/ed25519/donna/ed25519_tor.c

index 7f5894da79f874d910c4b8a204034432633c2d2a..12493f7d14103fcb780b585790864ee748e95003 100644 (file)
@@ -323,7 +323,7 @@ int
 ed25519_donna_pubkey_from_curve25519_pubkey(unsigned char *out,
   const unsigned char *inp, int signbit)
 {
-  static const bignum25519 one = { 1 };
+  static const bignum25519 ALIGN(16) one = { 1 };
   bignum25519 ALIGN(16) u, uminus1, uplus1, inv_uplus1, y;
 
   /* Prop228: y = (u-1)/(u+1) */