]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- fix unaligned structure making a false positive in checklock
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 1 Feb 2018 15:55:48 +0000 (15:55 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 1 Feb 2018 15:55:48 +0000 (15:55 +0000)
  unitialised memory.

git-svn-id: file:///svn/unbound/trunk@4490 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
util/data/msgreply.c

index 7fc9f26a4b9ba03f2a6c68b8e00e3ec87cb777ca..3af4ff2fd402f2e2c1661da760b2476df1a70846 100644 (file)
@@ -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.
index 1536176925018e2d8fe27ce51679920df8fd3e4a..dab64d657f112bb871d9b02ef53fbda1676c8d9f 100644 (file)
@@ -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;