]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix the use of dns_wildcardname as an optimisation in DLZ
authorMark Andrews <marka@isc.org>
Mon, 18 Feb 2019 01:57:35 +0000 (12:57 +1100)
committerEvan Hunt <each@isc.org>
Fri, 8 Mar 2019 04:27:57 +0000 (20:27 -0800)
(cherry picked from commit cb32cd98bda3a7e57ad098eeda128c3a2ffcc95e)

lib/dns/sdlz.c

index 1104bbcc057d146ae39a0a2bc1549edb718f500e..cb78eaad421e4f21f47e09cfd0c3962b26e040cc 100644 (file)
@@ -613,9 +613,9 @@ getnodedata(dns_db_t *db, const dns_name_t *name, bool create,
                        const dns_name_t *wild;
 
                        dns_fixedname_init(&fixed);
-                       if (i == dlabels)
+                       if (i == dlabels - 1) {
                                wild = dns_wildcardname;
-                       else {
+                       else {
                                dns_name_t *fname;
                                fname = dns_fixedname_name(&fixed);
                                dns_name_getlabelsequence(name, i + 1,