]> 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:08:13 +0000 (16:08 +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'

lib/dns/view.c

index ae662f850e6c639b53f65803009ca32a791ad339..2c5662473ef3d6510ad354dfdbd288edcba0e36d 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;