projects
/
project
/
odhcp6c.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ecb4665
)
Fix alignment of hash buffer in dhcpv6_response_is_valid
author
Ben Hutchings
<ben@decadent.org.uk>
Thu, 28 Jan 2016 02:18:51 +0000
(
02:18
+0000)
committer
Ben Hutchings
<ben@decadent.org.uk>
Thu, 28 Jan 2016 15:48:22 +0000
(15:48 +0000)
md5_final() writes to the hash buffer in 32-bit chunks, so it needs
to be 32-bit aligned.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
src/dhcpv6.c
patch
|
blob
|
history
diff --git
a/src/dhcpv6.c
b/src/dhcpv6.c
index cbf6991f31a0b73f841301183104d70575e7104b..f91f2cf16b8c8ff6fe881310433b98b68e2d8780 100644
(file)
--- 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));