]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Avoid overflow during statistics dump
authorPetr Špaček <pspacek@isc.org>
Fri, 1 Dec 2023 08:29:54 +0000 (09:29 +0100)
committerAydın Mercan <aydin@isc.org>
Wed, 3 Jan 2024 17:10:27 +0000 (20:10 +0300)
Related: !1493
Fixes: #4467
(cherry picked from commit 7b0115e33178711367d0375a884f85bb978aac14)

lib/isc/stats.c

index 3e4676c2aca710806e395a39026926559beff8c6..2e3fd3f47febfd1bf8276d012fcf0515e33047e1 100644 (file)
@@ -125,7 +125,7 @@ isc_stats_dump(isc_stats_t *stats, isc_stats_dumper_t dump_fn, void *arg,
        REQUIRE(ISC_STATS_VALID(stats));
 
        for (i = 0; i < stats->ncounters; i++) {
-               uint32_t counter = atomic_load_acquire(&stats->counters[i]);
+               isc__atomic_statcounter_t counter = atomic_load_acquire(&stats->counters[i]);
                if ((options & ISC_STATSDUMP_VERBOSE) == 0 && counter == 0) {
                        continue;
                }