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

c-ares / c-ares / 23713047820
92%

Build:
DEFAULT BRANCH: main
Ran 29 Mar 2026 04:03PM 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 04:00PM UTC coverage: 91.717% (+0.02%) from 91.697%
23713047820

push

github

web-flow
Fix undefined behavior in ares_buf_replace() pointer arithmetic (#1099)

Fix https://github.com/c-ares/c-ares/issues/1098:

The expression `ptr - (size_t)(buf->alloc_buf + buf->offset)` casts a
pointer to size_t then subtracts it from another pointer, which is
undefined behavior in C. UBSan flags this on every ares_buf_replace()
call as "applying non-zero offset to non-null pointer produced null
pointer".

Change to `ptr - buf->alloc_buf - buf->offset` which computes the same
offset using well-defined pointer-integer subtraction.

Signed-off-by: Kaixuan Li (@MarkLee131)

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

22776 of 24833 relevant lines covered (91.72%)

12855.26 hits per line

Jobs
ID Job ID Ran Files Coverage
1 23713047820.1 29 Mar 2026 04:02PM UTC 935
61.31
GitHub Action Run
Source Files on build 23713047820
  • Tree
  • List 177
  • Changed 56
  • Source Changed 0
  • Coverage Changed 56
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 557139ad on github
  • Prev Build on main (#23414914394)
  • Next Build on main (#23713475629)
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