You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix dangling hostname pointer in dns_poller; review cleanups
The hostname buffer passed to dns_poller_init() is block-scoped in main()
since 6b4de73, but the poller stored the raw pointer and read it on every
poll cycle after the block exited — use of a dead stack object. Copy the
hostname in dns_poller_init() and free it in dns_poller_cleanup() instead
of relying on the caller's buffer lifetime. The poller owns the copy, so
the struct member is a plain char * (no const cast needed to free it).
Also:
- flipped clang-tidy from wildcard check to finer grained checks
to avoid pulling in irrelevant stuff like altera-struct-pack-align.
- main.c: check the dns_poller calloc for NULL like every other
allocation site; validate -R as an IPv4/IPv6 literal before building
the curl resolve entry; warn when -R is ignored because the resolver
URL already contains an IP address
- doh_proxy.c: don't crash if doh_proxy_await_bootstrap() was given a
NULL callback
0 commit comments