From 0361d6ab70d13605ebc7226884b7418dcd91a1fb 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. (cherry picked from commit 8f7381446903133a407ea6ee30aa12a3536b8af3) --- 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 207f715265..fbb4b84259 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -10070,7 +10070,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; }