]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Initialize checknames field in dns_view_create()
authorMichal Nowak <mnowak@isc.org>
Mon, 22 Feb 2021 12:50:11 +0000 (13:50 +0100)
committerMichal Nowak <mnowak@isc.org>
Tue, 23 Feb 2021 15:45:36 +0000 (16:45 +0100)
The 'checknames' field wasn't initialized in dns_view_create(), but it
should otherwise AddressSanitizer identifies the following runtime error
in query_test.c.

    runtime error: load of value 190, which is not a valid value for type '_Bool'

(cherry picked from commit 0c6fa16477075ef0bcac46c9952ac771740e56d7)

lib/dns/view.c

index 035dedd1a320dae826a970d132f1f48c79e7e113..1910d587708056daac8677b7b05acd0894c3bec6 100644 (file)
@@ -190,6 +190,7 @@ dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass, const char *name,
        view->transfer_format = dns_one_answer;
        view->cacheacl = NULL;
        view->cacheonacl = NULL;
+       view->checknames = false;
        view->queryacl = NULL;
        view->queryonacl = NULL;
        view->recursionacl = NULL;