• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

c-ares / c-ares / 28688659819
90%

Build:
DEFAULT BRANCH: main
Ran 04 Jul 2026 12:06AM UTC
Jobs 1
Files 177
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Jul 2026 12:03AM UTC coverage: 91.624% (+0.02%) from 91.608%
28688659819

push

github

web-flow
ares_dns_parse: reject name compression in RDATA where not permitted (RFC 3597) (#1190)

`ares_dns_name_parse()` unconditionally followed DNS name-compression
pointers, even for RR types whose RDATA names may not use compression.
Per RFC 3597, only the RR types defined in RFC 1035 may use name
compression within their RDATA; other types (e.g. SRV per RFC 2782, and
NAPTR, SVCB, HTTPS, SIG, RRSIG, NSEC, …) must not. c-ares would instead
silently follow the pointer (#1181).

### Change
- Add an `allow_compression` argument to `ares_dns_name_parse()`. When
`ARES_FALSE`, a compression pointer encountered while parsing the name
is rejected with `ARES_EBADNAME`.
- The RDATA name parser (`ares_dns_parse_and_set_dns_name`) derives this
from the existing **`ares_dns_rec_allow_name_comp()`** policy keyed on
the record type — the same function the write side already uses. So
parse and write behavior now match and cannot drift, and the restriction
applies uniformly to **all** RR types where compression is not
permitted, not just SRV.
- Owner-name parsing (question + RR owner names) and
`ares_expand_name()` continue to allow compression (`ARES_TRUE`).

### Tests
- `ParseSrvRejectsCompressedTarget` — SRV target that is a compression
pointer is rejected.
- `ParseSvcbRejectsCompressedTarget` — same for a SVCB target,
exercising the shared policy rather than an SRV special case.

Both verified to fail before the change (they previously parsed
successfully by following the pointer). All existing SRV/SOA/MX/CNAME/NS
parsing (RFC 1035 types, which legitimately use compression) still
passes — full local test suite green.

Fixes #1181

Signed-off-by: Brad House <brad@brad-house.com>

20 of 20 new or added lines in 5 files covered. (100.0%)

23934 of 26122 relevant lines covered (91.62%)

12217.71 hits per line

Jobs
ID Job ID Ran Files Coverage
1 28688659819.1 04 Jul 2026 12:05AM UTC 940
61.43
GitHub Action Run
Source Files on build 28688659819
  • Tree
  • List 177
  • Changed 59
  • Source Changed 0
  • Coverage Changed 59
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • d6eba693 on github
  • Prev Build on main (#28688115491)
  • Next Build on main (#28707169038)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc