summaryrefslogtreecommitdiff
path: root/umac.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2008-05-19 16:07:45 +1000
committerDamien Miller <djm@mindrot.org>2008-05-19 16:07:45 +1000
commit0f30c87c45030005ed79d0c83c176d7abc91265f (patch)
tree7f413d162312398e3c65e37496dddfe2f4c99937 /umac.c
parentbab9bd4c20dac1d513fbf16d1214e0c0f9a1bf3b (diff)
- pvalchev@cvs.openbsd.org 2008/05/12 20:52:20
[umac.c] 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 'umac.c')
-rw-r--r--umac.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/umac.c b/umac.c
index ca5e08b3e..6b5a00585 100644
--- a/umac.c
+++ b/umac.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: umac.c,v 1.2 2007/09/12 19:39:19 stevesk Exp $ */ 1/* $OpenBSD: umac.c,v 1.3 2008/05/12 20:52:20 pvalchev Exp $ */
2/* ----------------------------------------------------------------------- 2/* -----------------------------------------------------------------------
3 * 3 *
4 * umac.c -- C Implementation UMAC Message Authentication 4 * umac.c -- C Implementation UMAC Message Authentication
@@ -1043,7 +1043,8 @@ static int uhash_update(uhash_ctx_t ctx, u_char *input, long len)
1043 */ 1043 */
1044{ 1044{
1045 UWORD bytes_hashed, bytes_remaining; 1045 UWORD bytes_hashed, bytes_remaining;
1046 UINT8 nh_result[STREAMS*sizeof(UINT64)]; 1046 UINT64 result_buf[STREAMS];
1047 UINT8 *nh_result = (UINT8 *)&result_buf;
1047 1048
1048 if (ctx->msg_len + len <= L1_KEY_LEN) { 1049 if (ctx->msg_len + len <= L1_KEY_LEN) {
1049 nh_update(&ctx->hash, (UINT8 *)input, len); 1050 nh_update(&ctx->hash, (UINT8 *)input, len);
@@ -1095,7 +1096,8 @@ static int uhash_update(uhash_ctx_t ctx, u_char *input, long len)
1095static int uhash_final(uhash_ctx_t ctx, u_char *res) 1096static int uhash_final(uhash_ctx_t ctx, u_char *res)
1096/* Incorporate any pending data, pad, and generate tag */ 1097/* Incorporate any pending data, pad, and generate tag */
1097{ 1098{
1098 UINT8 nh_result[STREAMS*sizeof(UINT64)]; 1099 UINT64 result_buf[STREAMS];
1100 UINT8 *nh_result = (UINT8 *)&result_buf;
1099 1101
1100 if (ctx->msg_len > L1_KEY_LEN) { 1102 if (ctx->msg_len > L1_KEY_LEN) {
1101 if (ctx->msg_len % L1_KEY_LEN) { 1103 if (ctx->msg_len % L1_KEY_LEN) {