From 8f7381446903133a407ea6ee30aa12a3536b8af3 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Fri, 3 Nov 2023 13:37:51 +0100 Subject: [PATCH] correctly limit hash resize to RBTDB_GLUE_TABLE_MAX_BITS Use < instead of <= when testing the new new hash bits size, otherwise it can exceed the limit. --- lib/dns/rbtdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index e99e1d79d8..89b853ec45 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -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; }