diff --git a/doc/Changelog b/doc/Changelog index 7fc9f26a4..3af4ff2fd 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,7 @@ +1 February 2018: Wouter + - fix unaligned structure making a false positive in checklock + unitialised memory. + 29 January 2018: Ralph - Use NSEC with longest ce to prove wildcard absence. - Only use *.ce to prove wildcard absence, no longer names. diff --git a/util/data/msgreply.c b/util/data/msgreply.c index 153617692..dab64d657 100644 --- a/util/data/msgreply.c +++ b/util/data/msgreply.c @@ -632,8 +632,9 @@ query_info_entrysetup(struct query_info* q, struct reply_info* r, e->entry.data = r; lock_rw_init(&e->entry.lock); lock_protect(&e->entry.lock, &e->key, sizeof(e->key)); - lock_protect(&e->entry.lock, &e->entry.hash, sizeof(e->entry.hash) + - sizeof(e->entry.key) + sizeof(e->entry.data)); + lock_protect(&e->entry.lock, &e->entry.hash, sizeof(e->entry.hash)); + lock_protect(&e->entry.lock, &e->entry.key, sizeof(e->entry.key)); + lock_protect(&e->entry.lock, &e->entry.data, sizeof(e->entry.data)); lock_protect(&e->entry.lock, e->key.qname, e->key.qname_len); q->qname = NULL; return e;