]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix the variable checked by a post-load assertion
authorMark Andrews <marka@isc.org>
Thu, 25 Feb 2021 03:44:44 +0000 (14:44 +1100)
committerMichał Kępień <michal@isc.org>
Thu, 10 Jun 2021 08:01:34 +0000 (10:01 +0200)
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

index f6e2d7556363cdb42514ca394973b9775af656e9..8497e23c0b9308ec3d9c66985fdf563a03f69004 100644 (file)
@@ -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))
                        {