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

c-ares / c-ares / 28745845168
90%

Build:
DEFAULT BRANCH: main
Ran 05 Jul 2026 03:37PM UTC
Jobs 1
Files 176
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

05 Jul 2026 03:34PM UTC coverage: 89.877% (+0.009%) from 89.868%
28745845168

push

github

web-flow
Prevent integer overflow in allocation size calculations (#1147)

### Summary

Prevent potential integer overflow in allocation size calculations and
ensure safe failure behavior.

### Changes

* Add `ares_size_t_mul_overflow` helper for checked multiplication
* Introduce overflow-safe allocation helpers:

  * `ares_malloc_zero_array`
  * `ares_realloc_zero_array`
* Apply safe allocation in `ares_parse_ns_reply` (input parsing path)
* Guard against wraparound in `ares_array_set_size` during power-of-2
growth

### Behavior

* No functional changes except:

  * returning `NULL` / `ARES_ENOMEM` on overflow
* Existing allocation and initialization semantics preserved

### Scope

* Minimal and localized changes
* No API changes or refactoring
* Only affects allocation size calculations and related safety checks

---------

Signed-off-by: Syed Mohammed Nayyar <jmestwa@gmail.com>
Signed-off-by: Brad House <brad@brad-house.com>
Co-authored-by: Brad House <brad@brad-house.com>

28 of 28 new or added lines in 6 files covered. (100.0%)

1 existing line in 1 file now uncovered.

24096 of 26810 relevant lines covered (89.88%)

15725.98 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
95.95
-0.4% src/lib/ares_init.c
Jobs
ID Job ID Ran Files Coverage
1 28745845168.1 05 Jul 2026 03:37PM UTC 176
89.88
GitHub Action Run
Source Files on build 28745845168
  • Tree
  • List 176
  • Changed 8
  • Source Changed 6
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28745845168
  • a0d832c9 on github
  • Prev Build on main (#28741068773)
  • Next Build on main (#28745921153)
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