]> git.ipfire.org Git - thirdparty/bind9.git/commit
fix_iterator() could produce incoherent iterator stacks
authorEvan Hunt <each@isc.org>
Wed, 20 Dec 2023 20:38:12 +0000 (12:38 -0800)
committerEvan Hunt <each@isc.org>
Thu, 21 Dec 2023 17:18:30 +0000 (09:18 -0800)
commit84f79cd16413185e4bfd222afa9d3854a4e485a3
tree5df16c5d2c9b27fa3f6786b3d5106ba0906956f4
parent93cc89e4d3e657571cf96570e71070bd53744acd
fix_iterator() could produce incoherent iterator stacks

the fix_iterator() function moves an iterator so that it points
to the predecessor of the searched-for name when that name doesn't
exist in the database. the tests only checked the correctness of
the top of the stack, however, and missed some cases where interior
branches in the stack could be missing or duplicated. in these
cases, the iterator would produce inconsistent results when walked.

the predecessors test case in qp_test has been updated to walk
each iterator to the end and ensure that the expected number of
nodes are found.
lib/dns/qp.c
tests/dns/qp_test.c