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

c-ares / c-ares / 23414914394
92%

Build:
DEFAULT BRANCH: main
Ran 22 Mar 2026 11:20PM 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

22 Mar 2026 11:17PM UTC coverage: 91.697% (-0.03%) from 91.725%
23414914394

push

github

web-flow
Add overflow checks to ares_buf_ensure_space() (#1094)

Two integer overflow issues in `ares_buf_ensure_space()`
(`src/lib/str/ares_buf.c`):

1. `needed_size++` at line 155 wraps to 0 when `needed_size ==
SIZE_MAX`, causing the subsequent `remaining_size >= needed_size` check
to pass incorrectly.

2. `alloc_size <<= 1` in the doubling loop at line 180 wraps to 0 when
`alloc_size > SIZE_MAX / 2`. Then `remaining_size = 0 - buf->data_len`
wraps to a large unsigned value, the loop exits, and
`ares_realloc(buf->alloc_buf, 0)` frees the buffer. Subsequent writes
via `ares_buf_append` go to freed memory.

Both checks return `ARES_ENOMEM` on overflow, consistent with the
existing allocation failure path at line 185.

2 of 4 new or added lines in 1 file covered. (50.0%)

6 existing lines in 3 files now uncovered.

22771 of 24833 relevant lines covered (91.7%)

12891.55 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
92.84
-0.26% src/lib/str/ares_buf.c

Coverage Regressions

Lines Coverage ∆ File
4
62.18
-0.66% src/lib/record/ares_dns_mapping.c
1
95.55
-0.4% src/lib/ares_init.c
1
86.67
-0.61% src/lib/dsa/ares_array.c
Jobs
ID Job ID Ran Files Coverage
1 23414914394.1 22 Mar 2026 11:20PM UTC 935
61.29
GitHub Action Run
Source Files on build 23414914394
  • Tree
  • List 177
  • Changed 58
  • Source Changed 0
  • Coverage Changed 58
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 46b7f689 on github
  • Prev Build on main (#23403404182)
  • Next Build on main (#23713047820)
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