]> 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:48:10 +0000 (16:48 +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 a7ba613990d69d6f8c095221b6691c931dcc1d1a..f01b4dea0fbf7f22e4dd0e54532c24478d0d99ce 100644 (file)
@@ -201,6 +201,7 @@ dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
        view->transfer_format = dns_one_answer;
        view->cacheacl = NULL;
        view->cacheonacl = NULL;
+       view->checknames = false;
        view->queryacl = NULL;
        view->queryonacl = NULL;
        view->recursionacl = NULL;