From: Evan Hunt Date: Mon, 8 Aug 2022 18:42:07 +0000 (-0700) Subject: fix overflow error in mem_putstats() X-Git-Tag: v9.19.5~45^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9d9bd3ace26e1b729b47f0381909a4fdcdab42a2;p=thirdparty%2Fbind9.git fix overflow error in mem_putstats() an integer overflow could cause an assertion failure when freeing memory. --- diff --git a/CHANGES b/CHANGES index 5072e6d28bb..d9920c89b56 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +5938. [bug] An integer type overflow could cause an assertion + failure when freeing memory. [GL #3483] + 5937. [cleanup] The dns_rdatalist_tordataset() and dns_rdatalist_fromrdataset() functions can no longer fail. Clean up their prototypes and error diff --git a/lib/isc/mem.c b/lib/isc/mem.c index bebe0e5c6cb..b2e53a31e18 100644 --- a/lib/isc/mem.c +++ b/lib/isc/mem.c @@ -414,7 +414,7 @@ mem_getstats(isc_mem_t *ctx, size_t size) { static void mem_putstats(isc_mem_t *ctx, void *ptr, size_t size) { struct stats *stats = stats_bucket(ctx, size); - uint_fast32_t s, g; + atomic_size_t s, g; UNUSED(ptr);