Commit 2292bcea authored by David Lawrence's avatar David Lawrence

tried to ascend a level in dns_rbtnodechain_next when at top level

parent 9821041d
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* SOFTWARE. * SOFTWARE.
*/ */
/* $Id: rbt.c,v 1.45 1999/04/20 22:01:00 tale Exp $ */ /* $Id: rbt.c,v 1.46 1999/04/22 14:16:52 tale Exp $ */
/* Principal Authors: DCL */ /* Principal Authors: DCL */
...@@ -2076,13 +2076,12 @@ dns_rbtnodechain_next(dns_rbtnodechain_t *chain, dns_name_t *name, ...@@ -2076,13 +2076,12 @@ dns_rbtnodechain_next(dns_rbtnodechain_t *chain, dns_name_t *name,
} }
} }
if (successor == NULL) { if (successor == NULL && chain->level_count > 0) {
/* /*
* Reached the root without having traversed * Reached the root without having traversed
* any left pointers, so this level is done. * any left pointers, so this level is done.
*/ */
INSIST(chain->level_count > 0 && INSIST(chain->ancestor_count > 0);
chain->ancestor_count > 0);
current = chain->levels[--chain->level_count]; current = chain->levels[--chain->level_count];
chain->ancestor_count--; chain->ancestor_count--;
new_origin = ISC_TRUE; new_origin = ISC_TRUE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment