diff options
author | Peter Valchev <pvalchev@cvs.openbsd.org> | 2008-05-12 20:52:21 +0000 |
---|---|---|
committer | Peter Valchev <pvalchev@cvs.openbsd.org> | 2008-05-12 20:52:21 +0000 |
commit | 1c452521489e8989c1459ce0f76fcf59da9042a4 (patch) | |
tree | 689257a659910d43dc083b9fa50a8faf1854fbff /usr.bin/ssh/umac.c | |
parent | 87c7985f57f39ae3881695f2fc5b7079ab63c6b0 (diff) |
Ensure nh_result lies on a 64-bit boundary (fixes warnings observed
on Itanium on Linux); from Dale Talcott (bug #1462); ok djm@
Diffstat (limited to 'usr.bin/ssh/umac.c')
-rw-r--r-- | usr.bin/ssh/umac.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ssh/umac.c b/usr.bin/ssh/umac.c index 003be0b13b8..b897a840844 100644 --- a/usr.bin/ssh/umac.c +++ b/usr.bin/ssh/umac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umac.c,v 1.2 2007/09/12 19:39:19 stevesk Exp $ */ +/* $OpenBSD: umac.c,v 1.3 2008/05/12 20:52:20 pvalchev Exp $ */ /* ----------------------------------------------------------------------- * * umac.c -- C Implementation UMAC Message Authentication @@ -1041,7 +1041,8 @@ static int uhash_update(uhash_ctx_t ctx, u_char *input, long len) */ { UWORD bytes_hashed, bytes_remaining; - UINT8 nh_result[STREAMS*sizeof(UINT64)]; + UINT64 result_buf[STREAMS]; + UINT8 *nh_result = (UINT8 *)&result_buf; if (ctx->msg_len + len <= L1_KEY_LEN) { nh_update(&ctx->hash, (UINT8 *)input, len); @@ -1093,7 +1094,8 @@ static int uhash_update(uhash_ctx_t ctx, u_char *input, long len) static int uhash_final(uhash_ctx_t ctx, u_char *res) /* Incorporate any pending data, pad, and generate tag */ { - UINT8 nh_result[STREAMS*sizeof(UINT64)]; + UINT64 result_buf[STREAMS]; + UINT8 *nh_result = (UINT8 *)&result_buf; if (ctx->msg_len > L1_KEY_LEN) { if (ctx->msg_len % L1_KEY_LEN) { |