]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
dsync_from struct produced an invalid record
authorMark Andrews <marka@isc.org>
Fri, 23 Jan 2026 02:32:41 +0000 (13:32 +1100)
committerMark Andrews <marka@isc.org>
Fri, 23 Jan 2026 13:38:51 +0000 (00:38 +1100)
uint16_tobuffer was used instead of uint8_tobuffer when adding the
scheme to the buffer.  This produced a record that was one octet
too long.  This has been fixed.

lib/dns/rdata/generic/dsync_66.c

index 0242da3ed0323170e2154d2c92ebba695adafce6..ca121fb78dd25ba75b5b0d5c7ebedbf4425c5f96 100644 (file)
@@ -238,7 +238,7 @@ fromstruct_dsync(ARGS_FROMSTRUCT) {
        UNUSED(rdclass);
 
        RETERR(uint16_tobuffer(dsync->type, target));
-       RETERR(uint16_tobuffer(dsync->scheme, target));
+       RETERR(uint8_tobuffer(dsync->scheme, target));
        RETERR(uint16_tobuffer(dsync->port, target));
        dns_name_toregion(&dsync->target, &region);
        return isc_buffer_copyregion(target, &region);