mirror of
https://github.com/isc-projects/bind9.git
synced 2026-07-11 08:35:27 -04:00
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
|
||
|---|---|---|
| .. | ||
| any_255 | ||
| ch_3 | ||
| generic | ||
| hs_4 | ||
| in_1 | ||
| rdatastructpre.h | ||
| rdatastructsuf.h | ||