]> 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 09:45:18 +0000 (10:45 +0100)
Fix incorrect length checks in the towire_*() methods for BRID and HHIT
records to prevent assertion failures when trying to serve short
records.

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

index 3dbae9730979f2f5830da959e45807ecc2135b59..316a822cd3ed42d0397c0841b01035737ace6f1d 100644 (file)
@@ -84,7 +84,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 d117aa6ef0c36d4ecb284fbc69429caf4a1664cf..b66e1a7386f42d51429d51f8114a97a7fe378156 100644 (file)
@@ -84,7 +84,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);