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

c-ares / c-ares / 23720685326
92%

Build:
DEFAULT BRANCH: main
Ran 29 Mar 2026 10:36PM 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

29 Mar 2026 10:33PM UTC coverage: 91.691% (-0.01%) from 91.704%
23720685326

push

github

web-flow
fix: prevent corrupt addrinfo nodes on sockaddr allocation failure (#1112)

ares_append_ai_node() appended a node to the linked list before
allocating its sockaddr. If the sockaddr malloc failed, the function
returned ARES_ENOMEM but left a node on the list with ai_addr=NULL and
ai_family=0. Callers iterating the list could then dereference the NULL
ai_addr.

Additionally, the two address-family blocks used independent if
statements rather than else-if, so an invalid aftype silently returned
ARES_SUCCESS with a broken node on the list.

Fix by allocating the sockaddr first, then appending the node only on
success. Reject invalid address families with ARES_EFORMERR. Also fix a
duplicate ai_addr assignment (copy-paste leftover).

Signed-off-by: David Hotham (@dimbleby)

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

2 existing lines in 2 files now uncovered.

22766 of 24829 relevant lines covered (91.69%)

12808.08 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
95.16
-1.71% src/lib/ares_addrinfo_localhost.c

Uncovered Existing Lines

Lines Coverage ∆ File
1
86.67
-0.61% src/lib/dsa/ares_array.c
1
92.69
-0.15% src/lib/str/ares_buf.c
Jobs
ID Job ID Ran Files Coverage
1 23720685326.1 29 Mar 2026 10:35PM UTC 935
61.29
GitHub Action Run
Source Files on build 23720685326
  • Tree
  • List 177
  • Changed 56
  • Source Changed 0
  • Coverage Changed 56
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • f668df90 on github
  • Prev Build on main (#23715046345)
  • Next Build on main (#23720746854)
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