mirror of
https://github.com/NLnetLabs/domain.git
synced 2026-10-01 06:04:57 +02:00
RFC 1035 section 3.3.14 requires "one or more" character strings, so rdlength=0 is invalid. `check_slice` (used by `from_octets` / `from_slice`) already enforced this; `parse` did not, allowing construction of a `Txt` that panics in `as_flat_slice`. Replace the manual `CharStr::skip` loop with a single `check_slice` call so all construction paths share the same validation. The zero-length unknown-rdata test now uses TYPE65534 instead of TXT since zero-length TXT is correctly invalid.
11 lines
186 B
YAML
11 lines
186 B
YAML
origin: example.com.
|
|
zonefile: |
|
|
example.com. 3600 IN TYPE65534 \# 0
|
|
result:
|
|
- owner: example.com.
|
|
class: IN
|
|
ttl: 3600
|
|
data: !Unknown
|
|
rtype: TYPE65534
|
|
data:
|