]> 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:27 +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 6f57f06e1831c3f0d8f0e2dbb19dcc7d0dac80e9..aa0f3a44caa5f5b9504f9a747c2558a2a5debf2e 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);