]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
correctly limit hash resize to RBTDB_GLUE_TABLE_MAX_BITS
authorEvan Hunt <each@isc.org>
Fri, 3 Nov 2023 12:37:51 +0000 (13:37 +0100)
committerEvan Hunt <each@isc.org>
Wed, 6 Dec 2023 19:30:41 +0000 (11:30 -0800)
Use < instead of <= when testing the new new hash bits size,
otherwise it can exceed the limit.

lib/dns/rbtdb.c

index e99e1d79d8ea7773964b0e9b6051f06164148ff8..89b853ec450a7e8495bd5e9b222b2f38fc966b16 100644 (file)
@@ -9640,7 +9640,7 @@ rehash_bits(rbtdb_version_t *version, size_t newcount) {
        uint32_t newbits = oldbits;
 
        while (newcount >= HASHSIZE(newbits) &&
-              newbits <= RBTDB_GLUE_TABLE_MAX_BITS)
+              newbits < RBTDB_GLUE_TABLE_MAX_BITS)
        {
                newbits += 1;
        }