From: Ben Hutchings Date: Thu, 28 Jan 2016 02:18:51 +0000 (+0000) Subject: Fix alignment of hash buffer in dhcpv6_response_is_valid X-Git-Tag: debian/1.1+git20160131-1~5^2 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=ca0693fe09d59a95192c4ad86492f05dfadbbf10;p=odhcp6c.git 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 --- 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));