mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Guard against NULL delegset in query_delegation_recurse()
If both dns_view_bestzonecut() and dns_deleg_fromrdataset() fail, delegset stays NULL. Passing it to ns_query_recurse() would crash on the REQUIRE(DNS_DELEGSET_VALID(delegset)) in createfetch(). Return ISC_R_NOTFOUND instead, which lets the caller handle the failure gracefully.
This commit is contained in:
parent
3a339cfca4
commit
a1cb966944
1 changed files with 7 additions and 2 deletions
|
|
@ -8670,8 +8670,13 @@ query_delegation_recurse(query_ctx_t *qctx) {
|
|||
fname = qctx->fname;
|
||||
}
|
||||
|
||||
result = ns_query_recurse(qctx->client, qctx->qtype, qname,
|
||||
fname, delegset, qctx->resuming);
|
||||
if (delegset == NULL) {
|
||||
result = ISC_R_NOTFOUND;
|
||||
} else {
|
||||
result = ns_query_recurse(qctx->client, qctx->qtype,
|
||||
qname, fname, delegset,
|
||||
qctx->resuming);
|
||||
}
|
||||
|
||||
if (delegset != NULL) {
|
||||
dns_delegset_detach(&delegset);
|
||||
|
|
|
|||
Loading…
Reference in a new issue