Fix incorrect length checks for BRID and HHIT records

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 14e299995f)
This commit is contained in:
Mark Andrews 2025-11-01 04:47:49 -04:00 committed by Nicki Křížek
parent 9772f988ec
commit 291d05be34
2 changed files with 2 additions and 2 deletions

View 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);

View 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);