bind9/lib/dns/rdata/generic
Ondřej Surý 815587fbe6 Consume the preference before reading the locator in NID/L64/L32 tostruct
tostruct_nid() and tostruct_l64() read the 16-bit preference with the
non-consuming uint16_fromregion() and then memmove()'d the whole
remaining region -- still ten octets, still anchored at the preference
-- into the eight-octet nid[]/l64[] arrays. That folded the preference
into the first two locator octets and stored two octets past the end of
the array. tostruct_l32() shares the root cause: it read the 32-bit
locator from the same unconsumed offset, so the value was built from the
preference plus the first two locator octets.

Consume the two preference octets first, matching the sibling
tostruct_lp(), and assert the expected framing on the fixed-size types.

(cherry picked from commit 5aa279bbea)
2026-07-02 10:55:30 +00:00
..
afsdb_18.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
afsdb_18.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
amtrelay_260.c AMTRELAY type 0 presentation format handling was wrong 2025-11-20 08:47:22 +00:00
amtrelay_260.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
avc_258.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
avc_258.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
brid_68.c Use isc_one_or_more when calling isc_base64_tobuffer 2026-01-28 08:02:06 +11:00
brid_68.h Add support for parsing and displaying BRID rdata type 2025-09-03 11:02:15 +10:00
caa_257.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
caa_257.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
cdnskey_60.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
cdnskey_60.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
cds_59.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
cds_59.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
cert_37.c Use isc_one_or_more when calling isc_base64_tobuffer 2026-01-28 08:02:06 +11:00
cert_37.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
cname_5.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
cname_5.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
csync_62.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
csync_62.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
dlv_32769.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
dlv_32769.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
dname_39.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
dname_39.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
dnskey_48.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
dnskey_48.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
doa_259.c Use isc__zero_or_more when calling isc_base64_tobuffer 2026-01-28 08:02:06 +11:00
doa_259.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
ds_43.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
ds_43.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
dsync_66.c dsync_from struct produced an invalid record 2026-01-23 14:24:27 +00:00
dsync_66.h Add support for parsing and displaying DSYNC rdata type 2025-08-06 13:47:33 +10:00
eui48_108.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
eui48_108.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
eui64_109.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
eui64_109.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
gpos_27.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
gpos_27.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
hhit_67.c Use isc_one_or_more when calling isc_base64_tobuffer 2026-01-28 08:02:06 +11:00
hhit_67.h Add support for parsing and displaying HHIT rdata type 2025-09-03 11:02:15 +10:00
hinfo_13.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
hinfo_13.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
hip_55.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
hip_55.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
ipseckey_45.c Use isc_one_or_more when calling isc_base64_tobuffer 2026-01-28 08:02:06 +11:00
ipseckey_45.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
isdn_20.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
isdn_20.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
key_25.c Use isc_one_or_more when calling isc_base64_tobuffer 2026-01-28 08:02:06 +11:00
key_25.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
keydata_65533.c Use isc_one_or_more when calling isc_base64_tobuffer 2026-01-28 08:02:06 +11:00
keydata_65533.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
l32_105.c Consume the preference before reading the locator in NID/L64/L32 tostruct 2026-07-02 10:55:30 +00:00
l32_105.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
l64_106.c Consume the preference before reading the locator in NID/L64/L32 tostruct 2026-07-02 10:55:30 +00:00
l64_106.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
loc_29.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
loc_29.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
lp_107.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
lp_107.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
mb_7.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
mb_7.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
md_3.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
md_3.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
mf_4.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
mf_4.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
mg_8.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
mg_8.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
minfo_14.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
minfo_14.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
mr_9.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
mr_9.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
mx_15.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
mx_15.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
naptr_35.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
naptr_35.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
nid_104.c Consume the preference before reading the locator in NID/L64/L32 tostruct 2026-07-02 10:55:30 +00:00
nid_104.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
ninfo_56.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
ninfo_56.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
ns_2.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
ns_2.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
nsec3_50.c Remove invalid REQUIRE in NSEC3 fromstruct method 2026-02-24 17:10:52 +01:00
nsec3_50.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
nsec3param_51.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
nsec3param_51.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
nsec_47.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
nsec_47.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
null_10.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
null_10.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
nxt_30.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
nxt_30.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
openpgpkey_61.c Use isc_one_or_more when calling isc_base64_tobuffer 2026-01-28 08:02:06 +11:00
openpgpkey_61.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
opt_41.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
opt_41.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
proforma.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
proforma.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
ptr_12.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
ptr_12.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
resinfo_261.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
resinfo_261.h Add RESINFO record type 2024-02-26 12:02:40 +11:00
rkey_57.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
rkey_57.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
rp_17.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
rp_17.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
rrsig_46.c Use isc_one_or_more when calling isc_base64_tobuffer 2026-01-28 08:02:06 +11:00
rrsig_46.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
rt_21.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
rt_21.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
sig_24.c Use isc_one_or_more when calling isc_base64_tobuffer 2026-01-28 08:02:06 +11:00
sig_24.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
sink_40.c Use isc__zero_or_more when calling isc_base64_tobuffer 2026-01-28 08:02:06 +11:00
sink_40.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
smimea_53.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
smimea_53.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
soa_6.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
soa_6.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
spf_99.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
spf_99.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
sshfp_44.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
sshfp_44.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
ta_32768.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
ta_32768.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
talink_58.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
talink_58.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
tkey_249.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
tkey_249.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
tlsa_52.c Use isc_one_or_more when calling isc_hex_tobuffer 2026-01-28 08:02:06 +11:00
tlsa_52.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
txt_16.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
txt_16.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
uri_256.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
uri_256.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
wallet_262.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
wallet_262.h Add the new record type WALLET (262) 2024-09-25 12:07:52 +00:00
x25_19.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
x25_19.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
zonemd_63.c Use DNS_RDATACOMMON_INIT to hide branch differences 2025-08-15 06:22:47 +10:00
zonemd_63.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00