]> 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)
committerPetr Špaček <pspacek@isc.org>
Thu, 14 Dec 2023 08:11:02 +0000 (09:11 +0100)
Related: !1493
Fixes: #4467
lib/isc/stats.c

index 5cc6e3d2b1de3ac98b673020dd6629f051b732fa..24614e1ec4353353d97106fbebc10b7ae1a27e63 100644 (file)
@@ -116,7 +116,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;
                }