From 098639dc593b69e974b38b10cfe168fbdff547f3 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 25 Feb 2021 14:44:44 +1100 Subject: [PATCH] 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. --- lib/dns/zone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dns/zone.c b/lib/dns/zone.c index f6e2d75563..8497e23c0b 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)) {