Browse Source

Fix for error where zone has more labels than an NS for the zone.
See ticket #1430 for more details. (Ticket pending tests before closing.)

Shane Kerr 13 years ago
parent
commit
81f62344db
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/lib/datasrc/database.cc

+ 1 - 1
src/lib/datasrc/database.cc

@@ -520,7 +520,7 @@ DatabaseClient::Finder::find(const isc::dns::Name& name,
                 // It's not empty non-terminal. So check for wildcards.
                 // We remove labels one by one and look for the wildcard there.
                 // Go up to first non-empty domain.
-                for (size_t i(1); i <= current_label_count - last_known; ++i) {
+                for (size_t i(1); i + last_known <= current_label_count; ++i) {
                     // Construct the name with *
                     const Name superdomain(name.split(i));
                     const string wildcard("*." + superdomain.toText());