]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Initialize checknames field in query_test.c
authorMichal Nowak <mnowak@isc.org>
Thu, 18 Feb 2021 13:49:23 +0000 (14:49 +0100)
committerMichal Nowak <mnowak@isc.org>
Tue, 23 Feb 2021 15:08:13 +0000 (16:08 +0100)
'checknames' field of struct dns_view is not initialized by
dns_view_create(). ASAN identified this as runtime error:

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

lib/ns/tests/query_test.c

index 6630ee336973354a381cfdcb1bdeba2a64678ffe..6558d3c98188fbca488a2274e98cc76f089ff209 100644 (file)
@@ -1412,6 +1412,7 @@ run_hookasync_e2e_test(const ns__query_hookasync_e2e_test_params_t *test) {
        qctx->client->sendcb = send_noop;
 
        /* Load a zone.  it should have ns.foo/A */
+       qctx->client->view->checknames = true;
        result = ns_test_serve_zone("foo", "testdata/query/foo.db",
                                    qctx->client->view);
        INSIST(result == ISC_R_SUCCESS);