]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
zonemd, review comments, fix no anchor lookup if none.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 12 Feb 2021 08:16:22 +0000 (09:16 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 12 Feb 2021 08:16:22 +0000 (09:16 +0100)
services/authzone.c

index 60a05d4bb78474b6aff172d8b47aabe2bff3e9a7..9818ab3441968cd4a93901edba4ba13248e31926 100644 (file)
@@ -8214,7 +8214,9 @@ void auth_zone_verify_zonemd(struct auth_zone* z, struct module_env* env,
        /* else, find chain of trust by fetching DNSKEYs lookup for zone */
        /* result if that, if insecure, means no DNSSEC for the ZONEMD,
         * otherwise we have the zone DNSKEY for the DNSSEC verification. */
-       anchor = anchors_lookup(env->anchors, z->name, z->namelen, z->dclass);
+       if(env->anchors)
+               anchor = anchors_lookup(env->anchors, z->name, z->namelen,
+                       z->dclass);
        if(anchor && query_dname_compare(z->name, anchor->name) == 0) {
                if(only_online) {
                        lock_basic_unlock(&anchor->lock);