From ca0693fe09d59a95192c4ad86492f05dfadbbf10 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 28 Jan 2016 02:18:51 +0000 Subject: [PATCH] Fix alignment of hash buffer in dhcpv6_response_is_valid md5_final() writes to the hash buffer in 32-bit chunks, so it needs to be 32-bit aligned. Signed-off-by: Ben Hutchings --- src/dhcpv6.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dhcpv6.c b/src/dhcpv6.c index cbf6991..f91f2cf 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -702,7 +702,8 @@ static bool dhcpv6_response_is_valid(const void *buf, ssize_t len, continue; md5_ctx_t md5; - uint8_t serverhash[16], secretbytes[64], hash[16]; + uint8_t serverhash[16], secretbytes[64]; + uint32_t hash[4]; memcpy(serverhash, r->key, sizeof(serverhash)); memset(r->key, 0, sizeof(r->key)); -- 2.39.5