aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/pubkey.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-12-20 18:30:21 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-12-20 18:32:40 +0100
commit53f9023e7e888a6d9d592a49e376fb75cb148563 (patch)
tree1cff807f005a352a8bd4ec6d35b616d85f2feb80 /src/pubkey.c
parentmakefile: use immediate expansion and use correct template patterns (diff)
downloadwireguard-tools-53f9023e7e888a6d9d592a49e376fb75cb148563.tar.xz
wireguard-tools-53f9023e7e888a6d9d592a49e376fb75cb148563.zip
wg: curve25519: handle unaligned loads/stores safely
Reported-by: Chris Hewitt <chris@chrishewitt.net> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/pubkey.c')
-rw-r--r--src/pubkey.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pubkey.c b/src/pubkey.c
index cf8e256..9741bcf 100644
--- a/src/pubkey.c
+++ b/src/pubkey.c
@@ -13,7 +13,7 @@
int pubkey_main(int argc, char *argv[])
{
- uint8_t key[WG_KEY_LEN];
+ uint8_t key[WG_KEY_LEN] __attribute__((aligned(sizeof(uintptr_t))));
char base64[WG_KEY_LEN_BASE64];
int trailing_char;