Files
SebastiaanYNandGitHub 39ffa13d64 Reject empty TXT records in Txt::parse (#709)
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.
2026-09-28 16:14:04 +02:00

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: