]> git.ipfire.org Git - thirdparty/bind9.git/commit
Skip detach when delv's client never created
authorOndřej Surý <ondrej@isc.org>
Thu, 30 Apr 2026 07:38:40 +0000 (09:38 +0200)
committerOndřej Surý <ondrej@isc.org>
Thu, 30 Apr 2026 10:07:49 +0000 (12:07 +0200)
commit96d3b2996821ca6a7db93e98630235febbc52e1e
tree70656fd3d58f7b9d94606bbb702fd4b7b19dd14d
parent49509dcbaebf29580460f13dba7fba0ccc3ef0c4
Skip detach when delv's client never created

run_resolve allocates dns_client_t late, but the cleanup epilogue
called dns_client_detach() unconditionally. When convert_name() or
dns_client_create() failed first, the detach hit a NULL client and
the REQUIRE(DNS_CLIENT_VALID) inside it aborted the process with
SIGABRT instead of a clean error exit.

Guard the detach with a NULL check. Add a digdelv test that runs
delv on a query name whose first label exceeds 63 octets and
asserts the process does not exit 134.

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit dba102ef16821f91f0494f9db5c9a646dcab913f)
bin/delv/delv.c
bin/tests/system/digdelv/tests.sh