]> 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 (GitLab job 6764530) <marka@isc.org>
Fri, 23 Jan 2026 14:24:32 +0000 (14:24 +0000)
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.

(cherry picked from commit 3180e5045978ce9fef524e98a66c0fdc7d7b783c)

lib/dns/rdata/generic/dsync_66.c

index 09303befb6fd69b76124b2ecc645f569f1193969..403c1f4cfaa1837d005d8fcd869b33b91773f172 100644 (file)
@@ -237,7 +237,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);