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

dnsimple / dns_erlang / 28460472875
88%

Build:
DEFAULT BRANCH: main
Ran 30 Jun 2026 04:39PM UTC
Jobs 1
Files 12
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

30 Jun 2026 04:38PM UTC coverage: 88.333% (+0.04%) from 88.294%
28460472875

push

github

web-flow
Surface malformed EDNS COOKIE as FORMERR instead of crashing (#129)

A COOKIE option (RFC 7873) with an invalid length raises `bad_cookie` in
`do_decode_optrrdata/2`. That call sat in the `of` body of the per-record
`try ... of ... catch` in `do_decode_message_additional/4`, where exceptions
are not caught, so it escaped `dns_decode`'s own error handling and propagated
to the caller's decode loop as an uncaught crash.

Move the record parse (the `from_wire/2` decode plus the rdata decoders
`decode_optrrdata/1` and `decode_rrdata/4`) into the `try` protected
expression so any decode failure on untrusted wire data — a bad cookie, or a
bad compression pointer in an RR's rdata — surfaces as a `{formerr, _, _}`
decode-error tuple. The recursion stays in the `of` body to remain in tail
position. The same shape is applied to `do_decode_message_body/4`.

Encoding an invalid cookie remains a hard error: building such a message is a
programming error on our side.

11 of 11 new or added lines in 1 file covered. (100.0%)

2756 of 3120 relevant lines covered (88.33%)

10988.21 hits per line

Jobs
ID Job ID Ran Files Coverage
1 28460472875.1 30 Jun 2026 04:39PM UTC 12
88.33
GitHub Action Run
Source Files on build 28460472875
  • Tree
  • List 12
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28460472875
  • 487aa673 on github
  • Prev Build on main (#28458044674)
  • Delete
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