]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix incorrect length checks for BRID and HHIT records
authorMark Andrews <marka@isc.org>
Sat, 1 Nov 2025 08:47:49 +0000 (04:47 -0400)
committerNicki Křížek <nicki@isc.org>
Thu, 8 Jan 2026 11:38:24 +0000 (12:38 +0100)
Fix incorrect length checks in the towire_*() methods for BRID and HHIT
records to prevent assertion failures when trying to serve short
records.

(cherry picked from commit 14e299995f8f1dd8faeb7c5395a5a0c12b0f43f4)

lib/dns/rdata/generic/brid_68.c
lib/dns/rdata/generic/hhit_67.c

index 11afb16e3337fcb755f055f731f17fd43b933a05..ac3bbb35ae28d824e5b960c363d3e1571cda509d 100644 (file)
@@ -85,7 +85,7 @@ fromwire_brid(ARGS_FROMWIRE) {
 static isc_result_t
 towire_brid(ARGS_TOWIRE) {
        REQUIRE(rdata->type == dns_rdatatype_brid);
-       REQUIRE(rdata->length >= 3);
+       REQUIRE(rdata->length > 0);
 
        UNUSED(cctx);
 
index 8b51a82ddb4b43962fb0bb7f30d36dd9bb8efa19..c0b57730e7bfeb77b3c658ab217bd79d63160b4c 100644 (file)
@@ -85,7 +85,7 @@ fromwire_hhit(ARGS_FROMWIRE) {
 static isc_result_t
 towire_hhit(ARGS_TOWIRE) {
        REQUIRE(rdata->type == dns_rdatatype_hhit);
-       REQUIRE(rdata->length >= 3);
+       REQUIRE(rdata->length > 0);
 
        UNUSED(cctx);