fix overflow error in mem_putstats()

an integer overflow could cause an assertion failure when
freeing memory.

(cherry picked from commit 0401e0867b1516386fab9b390b750a2f99883188)
This commit is contained in:
Evan Hunt 2022-08-08 11:42:07 -07:00
parent 5d200cb2bd
commit 1843780151
2 changed files with 4 additions and 1 deletions

View file

@ -1,3 +1,6 @@
5938. [bug] An integer type overflow could cause an assertion
failure when freeing memory. [GL #3483]
5936. [bug] Don't enable serve-stale for lookups that error because
it is a duplicate query or a query that would be
dropped. [GL #2982]

View 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);