2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

2618. [bug] The sdb and sdlz db_interator_seek() methods could

loop infinitely. [RT #19847]
This commit is contained in:
Mark Andrews
2009-06-26 06:21:03 +00:00
parent 870332fb6d
commit 01dbc4fc00
3 changed files with 12 additions and 5 deletions

View File

@@ -50,7 +50,7 @@
* USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: sdlz.c,v 1.20 2009/04/21 23:48:04 tbox Exp $ */
/* $Id: sdlz.c,v 1.21 2009/06/26 06:21:03 marka Exp $ */
/*! \file */
@@ -1117,9 +1117,11 @@ dbiterator_seek(dns_dbiterator_t *iterator, dns_name_t *name) {
sdlz_dbiterator_t *sdlziter = (sdlz_dbiterator_t *)iterator;
sdlziter->current = ISC_LIST_HEAD(sdlziter->nodelist);
while (sdlziter->current != NULL)
while (sdlziter->current != NULL) {
if (dns_name_equal(sdlziter->current->name, name))
return (ISC_R_SUCCESS);
sdlziter->current = ISC_LIST_NEXT(sdlziter->current, link);
}
return (ISC_R_NOTFOUND);
}