From: Mark Andrews Date: Thu, 25 Feb 2021 03:44:44 +0000 (+1100) Subject: Fix the variable checked by a post-load assertion X-Git-Tag: v9.17.16~42^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=098639dc593b69e974b38b10cfe168fbdff547f3;p=thirdparty%2Fbind9.git Fix the variable checked by a post-load assertion Instead of checking the value of the variable modified two lines earlier (the number of SOA records present at the apex of the old version of the zone), one of the RUNTIME_CHECK() assertions in zone_postload() checks the number of SOA records present at the apex of the new version of the zone, which is already checked before. Fix the assertion by making it check the correct variable. --- diff --git a/lib/dns/zone.c b/lib/dns/zone.c index f6e2d755636..8497e23c0b9 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -4969,7 +4969,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime, zone, zone->db, NULL, &oldsoacount, NULL, &oldserial, NULL, NULL, NULL, NULL, NULL); RUNTIME_CHECK(result == ISC_R_SUCCESS); - RUNTIME_CHECK(soacount > 0U); + RUNTIME_CHECK(oldsoacount > 0U); if (DNS_ZONE_OPTION(zone, DNS_ZONEOPT_IXFRFROMDIFFS) && !isc_serial_gt(serial, oldserial)) {