mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-26 11:22:52 -04:00
In dbiterator_prev, dereference_iter_node was being called too soon
dns_rbtnodechain_prev requires the current node to still be valid which was not always the case after dereference_iter_node was called. Move the call to dereference_iter_node to after the dns_rbtnodechain_prev to preserve the node.
This commit is contained in:
parent
89478d95c3
commit
b677d31fca
1 changed files with 3 additions and 2 deletions
|
|
@ -4675,11 +4675,12 @@ dbiterator_prev(dns_dbiterator_t *iterator DNS__DB_FLARG) {
|
|||
resume_iteration(rbtdbiter);
|
||||
}
|
||||
|
||||
dereference_iter_node(rbtdbiter DNS__DB_FLARG_PASS);
|
||||
|
||||
name = dns_fixedname_name(&rbtdbiter->name);
|
||||
origin = dns_fixedname_name(&rbtdbiter->origin);
|
||||
result = dns_rbtnodechain_prev(rbtdbiter->current, name, origin);
|
||||
|
||||
dereference_iter_node(rbtdbiter DNS__DB_FLARG_PASS);
|
||||
|
||||
if (rbtdbiter->current == &rbtdbiter->nsec3chain &&
|
||||
(result == ISC_R_SUCCESS || result == DNS_R_NEWORIGIN))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue