]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix overflow error in mem_putstats()
authorEvan Hunt <each@isc.org>
Mon, 8 Aug 2022 18:42:07 +0000 (11:42 -0700)
committerEvan Hunt <each@isc.org>
Tue, 9 Aug 2022 17:59:43 +0000 (10:59 -0700)
an integer overflow could cause an assertion failure when
freeing memory.

CHANGES
lib/isc/mem.c

diff --git a/CHANGES b/CHANGES
index 5072e6d28bb43cc92421884b21c330ccbc6040e2..d9920c89b56118f952bf141e2fd2984d146b0d78 100644 (file)
--- 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
index bebe0e5c6cbceb1bacfde802629bfe9b064b6c73..b2e53a31e18a9110be05982e65a98c373197bdb5 100644 (file)
@@ -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);