diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index 3751d799d9..ca2cc97757 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -836,8 +836,7 @@ clone_lookup(dig_lookup_t *lookold, bool servers) { memmove(looknew->ecs_addr, lookold->ecs_addr, len); } - dns_name_copy(dns_fixedname_name(&lookold->fdomain), - dns_fixedname_name(&looknew->fdomain), NULL); + RUNTIME_CHECK(dns_name_copy(dns_fixedname_name(&lookold->fdomain), dns_fixedname_name(&looknew->fdomain), NULL) == ISC_R_SUCCESS); if (servers) clone_server_list(lookold->my_server_list, @@ -1842,7 +1841,7 @@ followup_lookup(dns_message_t *msg, dig_query_t *query, dns_section_t section) if (lookup->ns_search_only) lookup->recurse = false; domain = dns_fixedname_name(&lookup->fdomain); - dns_name_copy(name, domain, NULL); + RUNTIME_CHECK(dns_name_copy(name, domain, NULL) == ISC_R_SUCCESS); } debug("adding server %s", namestr); num = getaddresses(lookup, namestr, &lresult); diff --git a/bin/dig/host.c b/bin/dig/host.c index 5942fd159b..7b53e8e3be 100644 --- a/bin/dig/host.c +++ b/bin/dig/host.c @@ -394,7 +394,7 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) { dns_rdataset_current(rdataset, &rdata); result = dns_rdata_tostruct(&rdata, &cname, NULL); check_result(result, "dns_rdata_tostruct"); - dns_name_copy(&cname.cname, qname, NULL); + RUNTIME_CHECK(dns_name_copy(&cname.cname, qname, NULL) == ISC_R_SUCCESS); dns_rdata_freestruct(&cname); } } @@ -456,7 +456,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, /* Add AAAA and MX lookups. */ name = dns_fixedname_initname(&fixed); - dns_name_copy(query->lookup->name, name, NULL); + RUNTIME_CHECK(dns_name_copy(query->lookup->name, name, NULL) == ISC_R_SUCCESS); chase_cnamechain(msg, name); dns_name_format(name, namestr, sizeof(namestr)); lookup = clone_lookup(query->lookup, false); diff --git a/bin/dig/nslookup.c b/bin/dig/nslookup.c index 6d2d073864..db0da0174f 100644 --- a/bin/dig/nslookup.c +++ b/bin/dig/nslookup.c @@ -423,7 +423,7 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) { dns_rdataset_current(rdataset, &rdata); result = dns_rdata_tostruct(&rdata, &cname, NULL); check_result(result, "dns_rdata_tostruct"); - dns_name_copy(&cname.cname, qname, NULL); + RUNTIME_CHECK(dns_name_copy(&cname.cname, qname, NULL) == ISC_R_SUCCESS); dns_rdata_freestruct(&cname); } } @@ -481,7 +481,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, /* Add AAAA lookup. */ name = dns_fixedname_initname(&fixed); - dns_name_copy(query->lookup->name, name, NULL); + RUNTIME_CHECK(dns_name_copy(query->lookup->name, name, NULL) == ISC_R_SUCCESS); chase_cnamechain(msg, name); dns_name_format(name, namestr, sizeof(namestr)); lookup = clone_lookup(query->lookup, false); diff --git a/bin/dnssec/dnssec-signzone.c b/bin/dnssec/dnssec-signzone.c index 005e7fe810..e8858dc681 100644 --- a/bin/dnssec/dnssec-signzone.c +++ b/bin/dnssec/dnssec-signzone.c @@ -197,7 +197,7 @@ savezonecut(dns_fixedname_t *fzonecut, dns_name_t *name) { dns_name_t *result; result = dns_fixedname_initname(fzonecut); - dns_name_copy(name, result, NULL); + RUNTIME_CHECK(dns_name_copy(name, result, NULL) == ISC_R_SUCCESS); return (result); } @@ -2325,7 +2325,7 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations, break; } if (result == ISC_R_NOMORE) { - dns_name_copy(gorigin, nextname, NULL); + RUNTIME_CHECK(dns_name_copy(gorigin, nextname, NULL) == ISC_R_SUCCESS); done = true; } else if (result != ISC_R_SUCCESS) fatal("iterating through the database failed: %s", @@ -2459,7 +2459,7 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations, break; } if (result == ISC_R_NOMORE) { - dns_name_copy(gorigin, nextname, NULL); + RUNTIME_CHECK(dns_name_copy(gorigin, nextname, NULL) == ISC_R_SUCCESS); done = true; } else if (result != ISC_R_SUCCESS) fatal("iterating through the database failed: %s", diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index f403095e6b..1881da2832 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -2618,7 +2618,7 @@ recvsoa(isc_task_t *task, isc_event_t *event) { * address. */ zname = dns_fixedname_initname(&fzname); - dns_name_copy(name, zname, NULL); + RUNTIME_CHECK(dns_name_copy(name, zname, NULL) == ISC_R_SUCCESS); } if (debugging) { diff --git a/lib/dns/journal.c b/lib/dns/journal.c index 1912f2a2fd..cddebbefcd 100644 --- a/lib/dns/journal.c +++ b/lib/dns/journal.c @@ -130,7 +130,7 @@ dns_db_createsoatuple(dns_db_t *db, dns_dbversion_t *ver, isc_mem_t *mctx, dns_name_t *zonename; zonename = dns_fixedname_initname(&fixed); - dns_name_copy(dns_db_origin(db), zonename, NULL); + RUNTIME_CHECK(dns_name_copy(dns_db_origin(db), zonename, NULL) == ISC_R_SUCCESS); node = NULL; result = dns_db_findnode(db, zonename, false, &node); diff --git a/lib/dns/masterdump.c b/lib/dns/masterdump.c index 8e1cb714b9..361bfeaea4 100644 --- a/lib/dns/masterdump.c +++ b/lib/dns/masterdump.c @@ -521,7 +521,7 @@ rdataset_totext(dns_rdataset_t *rdataset, if (owner_name != NULL) { name = dns_fixedname_initname(&fixed); - dns_name_copy(owner_name, name, NULL); + RUNTIME_CHECK(dns_name_copy(owner_name, name, NULL) == ISC_R_SUCCESS); dns_rdataset_getownercase(rdataset, name); } @@ -1215,7 +1215,7 @@ dump_rdatasets_raw(isc_mem_t *mctx, const dns_name_t *owner_name, dns_name_t *name; name = dns_fixedname_initname(&fixed); - dns_name_copy(owner_name, name, NULL); + RUNTIME_CHECK(dns_name_copy(owner_name, name, NULL) == ISC_R_SUCCESS); for (result = dns_rdatasetiter_first(rdsiter); result == ISC_R_SUCCESS; result = dns_rdatasetiter_next(rdsiter)) { diff --git a/lib/dns/nsec3.c b/lib/dns/nsec3.c index be6949b407..aa2a3fc67a 100644 --- a/lib/dns/nsec3.c +++ b/lib/dns/nsec3.c @@ -1926,7 +1926,7 @@ dns_nsec3_noexistnodata(dns_rdatatype_t type, const dns_name_t *name, */ if (dns_name_countlabels(zonename) == 0 || dns_name_issubdomain(zone, zonename)) - dns_name_copy(zone, zonename, NULL); + RUNTIME_CHECK(dns_name_copy(zone, zonename, NULL) == ISC_R_SUCCESS); if (!dns_name_equal(zone, zonename)) return (ISC_R_IGNORE); @@ -2069,7 +2069,7 @@ dns_nsec3_noexistnodata(dns_rdatatype_t type, const dns_name_t *name, (*logit)(arg, ISC_LOG_DEBUG(3), "NSEC3 indicates potential closest " "encloser: '%s'", namebuf); - dns_name_copy(qname, closest, NULL); + RUNTIME_CHECK(dns_name_copy(qname, closest, NULL) == ISC_R_SUCCESS); *setclosest = true; } dns_name_format(qname, namebuf, sizeof(namebuf)); @@ -2100,7 +2100,7 @@ dns_nsec3_noexistnodata(dns_rdatatype_t type, const dns_name_t *name, if (nearest != NULL && (dns_name_countlabels(nearest) == 0 || dns_name_issubdomain(nearest, qname))) { - dns_name_copy(qname, nearest, NULL); + RUNTIME_CHECK(dns_name_copy(qname, nearest, NULL) == ISC_R_SUCCESS); *setnearest = true; } diff --git a/lib/dns/nta.c b/lib/dns/nta.c index 428a40d319..809ab3841d 100644 --- a/lib/dns/nta.c +++ b/lib/dns/nta.c @@ -310,7 +310,7 @@ nta_create(dns_ntatable_t *ntatable, const dns_name_t *name, isc_refcount_init(&nta->refcount, 1); nta->name = dns_fixedname_initname(&nta->fn); - dns_name_copy(name, nta->name, NULL); + RUNTIME_CHECK(dns_name_copy(name, nta->name, NULL) == ISC_R_SUCCESS); nta->magic = NTA_MAGIC; diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index d7d65c047b..47d198ec14 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -5075,7 +5075,7 @@ cache_findzonecut(dns_db_t *db, const dns_name_t *name, unsigned int options, } else if (result != ISC_R_SUCCESS) { goto tree_exit; } else if (!dcnull) { - dns_name_copy(dcname, foundname, NULL); + RUNTIME_CHECK(dns_name_copy(dcname, foundname, NULL) == ISC_R_SUCCESS); } /* * We now go looking for an NS rdataset at the node. @@ -9315,7 +9315,8 @@ dbiterator_origin(dns_dbiterator_t *iterator, dns_name_t *name) { if (rbtdbiter->result != ISC_R_SUCCESS) return (rbtdbiter->result); - return (dns_name_copy(origin, name, NULL)); + RUNTIME_CHECK(dns_name_copy(origin, name, NULL) == ISC_R_SUCCESS); + return (ISC_R_SUCCESS); } static void @@ -9684,7 +9685,7 @@ glue_nsdname_cb(void *arg, const dns_name_t *name, dns_rdatatype_t qtype) { glue = isc_mem_get(ctx->rbtdb->common.mctx, sizeof(*glue)); gluename = dns_fixedname_initname(&glue->fixedname); - dns_name_copy(name_a, gluename, NULL); + RUNTIME_CHECK(dns_name_copy(name_a, gluename, NULL) == ISC_R_SUCCESS); dns_rdataset_init(&glue->rdataset_a); dns_rdataset_init(&glue->sigrdataset_a); @@ -9708,7 +9709,7 @@ glue_nsdname_cb(void *arg, const dns_name_t *name, dns_rdatatype_t qtype) { sizeof(*glue)); gluename = dns_fixedname_initname(&glue->fixedname); - dns_name_copy(name_aaaa, gluename, NULL); + RUNTIME_CHECK(dns_name_copy(name_aaaa, gluename, NULL) == ISC_R_SUCCESS); dns_rdataset_init(&glue->rdataset_a); dns_rdataset_init(&glue->sigrdataset_a); diff --git a/lib/dns/rdataset.c b/lib/dns/rdataset.c index 629d6fc979..5aaf1ddce4 100644 --- a/lib/dns/rdataset.c +++ b/lib/dns/rdataset.c @@ -454,7 +454,7 @@ towiresorted(dns_rdataset_t *rdataset, const dns_name_t *owner_name, added = 0; name = dns_fixedname_initname(&fixed); - dns_name_copy(owner_name, name, NULL); + RUNTIME_CHECK(dns_name_copy(owner_name, name, NULL) == ISC_R_SUCCESS); dns_rdataset_getownercase(rdataset, name); offset = 0xffff; diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index bb33c987b7..3b0bea495b 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -1519,7 +1519,7 @@ fcount_incr(fetchctx_t *fctx, bool force) { counter->allowed = 1; counter->dropped = 0; counter->domain = dns_fixedname_initname(&counter->fdname); - dns_name_copy(&fctx->domain, counter->domain, NULL); + RUNTIME_CHECK(dns_name_copy(&fctx->domain, counter->domain, NULL) == ISC_R_SUCCESS); ISC_LIST_APPEND(dbucket->list, counter, link); } } else { @@ -5345,8 +5345,7 @@ validated(isc_task_t *task, isc_event_t *event) { */ if (vevent->proofs[DNS_VALIDATOR_NOQNAMEPROOF] != NULL) { wild = dns_fixedname_initname(&fwild); - dns_name_copy(dns_fixedname_name(&vevent->validator->wild), - wild, NULL); + RUNTIME_CHECK(dns_name_copy(dns_fixedname_name(&vevent->validator->wild), wild, NULL) == ISC_R_SUCCESS); } dns_validator_destroy(&vevent->validator); isc_mem_put(fctx->mctx, valarg, sizeof(*valarg)); @@ -7080,7 +7079,7 @@ resume_dslookup(isc_task_t *task, isc_event_t *event) { * Retrieve state from fctx->nsfetch before we destroy it. */ domain = dns_fixedname_initname(&fixed); - dns_name_copy(&fctx->nsfetch->private->domain, domain, NULL); + RUNTIME_CHECK(dns_name_copy(&fctx->nsfetch->private->domain, domain, NULL) == ISC_R_SUCCESS); if (dns_name_equal(&fctx->nsname, domain)) { if (dns_rdataset_isassociated(fevent->rdataset)) { dns_rdataset_disassociate(fevent->rdataset); diff --git a/lib/dns/rrl.c b/lib/dns/rrl.c index b1b5ac037a..55fb3dcc0d 100644 --- a/lib/dns/rrl.c +++ b/lib/dns/rrl.c @@ -885,9 +885,7 @@ make_log_buf(dns_rrl_t *rrl, dns_rrl_entry_t *e, e->log_qname = qbuf->index; qbuf->e = e; dns_fixedname_init(&qbuf->qname); - dns_name_copy(qname, - dns_fixedname_name(&qbuf->qname), - NULL); + RUNTIME_CHECK(dns_name_copy(qname, dns_fixedname_name(&qbuf->qname), NULL) == ISC_R_SUCCESS); } } if (qbuf != NULL) diff --git a/lib/dns/sdb.c b/lib/dns/sdb.c index e7683a7918..019d50f5e9 100644 --- a/lib/dns/sdb.c +++ b/lib/dns/sdb.c @@ -1544,8 +1544,10 @@ dbiterator_current(dns_dbiterator_t *iterator, dns_dbnode_t **nodep, sdb_dbiterator_t *sdbiter = (sdb_dbiterator_t *)iterator; attachnode(iterator->db, sdbiter->current, nodep); - if (name != NULL) - return (dns_name_copy(sdbiter->current->name, name, NULL)); + if (name != NULL) { + RUNTIME_CHECK(dns_name_copy(sdbiter->current->name, name, NULL) == ISC_R_SUCCESS); + return (ISC_R_SUCCESS); + } return (ISC_R_SUCCESS); } @@ -1558,7 +1560,8 @@ dbiterator_pause(dns_dbiterator_t *iterator) { static isc_result_t dbiterator_origin(dns_dbiterator_t *iterator, dns_name_t *name) { UNUSED(iterator); - return (dns_name_copy(dns_rootname, name, NULL)); + RUNTIME_CHECK(dns_name_copy(dns_rootname, name, NULL) == ISC_R_SUCCESS); + return (ISC_R_SUCCESS); } /* diff --git a/lib/dns/sdlz.c b/lib/dns/sdlz.c index 9b12321929..69d9096cc3 100644 --- a/lib/dns/sdlz.c +++ b/lib/dns/sdlz.c @@ -1389,8 +1389,10 @@ dbiterator_current(dns_dbiterator_t *iterator, dns_dbnode_t **nodep, sdlz_dbiterator_t *sdlziter = (sdlz_dbiterator_t *)iterator; attachnode(iterator->db, sdlziter->current, nodep); - if (name != NULL) - return (dns_name_copy(sdlziter->current->name, name, NULL)); + if (name != NULL) { + RUNTIME_CHECK(dns_name_copy(sdlziter->current->name, name, NULL) == ISC_R_SUCCESS); + return (ISC_R_SUCCESS); + } return (ISC_R_SUCCESS); } @@ -1403,7 +1405,8 @@ dbiterator_pause(dns_dbiterator_t *iterator) { static isc_result_t dbiterator_origin(dns_dbiterator_t *iterator, dns_name_t *name) { UNUSED(iterator); - return (dns_name_copy(dns_rootname, name, NULL)); + RUNTIME_CHECK(dns_name_copy(dns_rootname, name, NULL) == ISC_R_SUCCESS); + return (ISC_R_SUCCESS); } /* diff --git a/lib/dns/tkey.c b/lib/dns/tkey.c index 965d6d52d6..26a6fb8429 100644 --- a/lib/dns/tkey.c +++ b/lib/dns/tkey.c @@ -1497,7 +1497,7 @@ dns_tkey_gssnegotiate(dns_message_t *qmsg, dns_message_t *rmsg, dns_fixedname_t fixed; dns_fixedname_init(&fixed); - dns_name_copy(tkeyname, dns_fixedname_name(&fixed), NULL); + RUNTIME_CHECK(dns_name_copy(tkeyname, dns_fixedname_name(&fixed), NULL) == ISC_R_SUCCESS); tkeyname = dns_fixedname_name(&fixed); tkey.common.rdclass = dns_rdataclass_any; diff --git a/lib/dns/validator.c b/lib/dns/validator.c index 3aa919483e..3c5b99ce79 100644 --- a/lib/dns/validator.c +++ b/lib/dns/validator.c @@ -1394,7 +1394,7 @@ verify(dns_validator_t *val, dst_key_t *key, dns_rdata_t *rdata, * for the NSEC3 NOQNAME proof. */ closest = dns_fixedname_name(&val->closest); - dns_name_copy(wild, closest, NULL); + RUNTIME_CHECK(dns_name_copy(wild, closest, NULL) == ISC_R_SUCCESS); labels = dns_name_countlabels(closest) - 1; dns_name_getlabelsequence(closest, 1, labels, closest); val->attributes |= VALATTR_NEEDNOQNAME; @@ -2241,7 +2241,7 @@ findnsec3proofs(dns_validator_t *val) { namebuf, sizeof(namebuf)); validator_log(val, ISC_LOG_DEBUG(3), "closest encloser from " "wildcard signature '%s'", namebuf); - dns_name_copy(dns_fixedname_name(&val->closest), closest, NULL); + RUNTIME_CHECK(dns_name_copy(dns_fixedname_name(&val->closest), closest, NULL) == ISC_R_SUCCESS); closestp = NULL; setclosestp = NULL; } else { @@ -2634,7 +2634,7 @@ proveunsecure(dns_validator_t *val, bool have_ds, bool resume) { secroot = dns_fixedname_initname(&fixedsecroot); found = dns_fixedname_initname(&fixedfound); - dns_name_copy(val->event->name, secroot, NULL); + RUNTIME_CHECK(dns_name_copy(val->event->name, secroot, NULL) == ISC_R_SUCCESS); /* * If this is a response to a DS query, we need to look in * the parent zone for the trust anchor. @@ -2705,7 +2705,7 @@ proveunsecure(dns_validator_t *val, bool have_ds, bool resume) { tname = dns_fixedname_initname(&val->fname); if (val->labels == dns_name_countlabels(val->event->name)) - dns_name_copy(val->event->name, tname, NULL); + RUNTIME_CHECK(dns_name_copy(val->event->name, tname, NULL) == ISC_R_SUCCESS); else dns_name_split(val->event->name, val->labels, NULL, tname); diff --git a/lib/dns/view.c b/lib/dns/view.c index ce2ca2e096..2712df9e3d 100644 --- a/lib/dns/view.c +++ b/lib/dns/view.c @@ -1384,7 +1384,7 @@ dns_view_findzonecut(dns_view_t *view, const dns_name_t *name, dns_rdataset_disassociate(rdataset); result = ISC_R_NOTFOUND; } else if (dcname != NULL) { - dns_name_copy(fname, dcname, NULL); + RUNTIME_CHECK(dns_name_copy(fname, dcname, NULL) == ISC_R_SUCCESS); } } diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 669db74b75..14b46faa66 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -3051,7 +3051,7 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) { /* * Remember bottom of zone due to NS. */ - dns_name_copy(name, bottom, NULL); + RUNTIME_CHECK(dns_name_copy(name, bottom, NULL) == ISC_R_SUCCESS); result = dns_rdataset_first(&rdataset); while (result == ISC_R_SUCCESS) { @@ -3074,7 +3074,7 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) { /* * Remember bottom of zone due to DNAME. */ - dns_name_copy(name, bottom, NULL); + RUNTIME_CHECK(dns_name_copy(name, bottom, NULL) == ISC_R_SUCCESS); dns_rdataset_disassociate(&rdataset); } @@ -7858,7 +7858,7 @@ zone_nsec3chain(dns_zone_t *zone) { * Remember the obscuring name so that * we skip all obscured names. */ - dns_name_copy(found, name, NULL); + RUNTIME_CHECK(dns_name_copy(found, name, NULL) == ISC_R_SUCCESS); delegation = true; goto next_addnode; } @@ -8121,7 +8121,7 @@ zone_nsec3chain(dns_zone_t *zone) { * Remember the obscuring name so that * we skip all obscured names. */ - dns_name_copy(found, name, NULL); + RUNTIME_CHECK(dns_name_copy(found, name, NULL) == ISC_R_SUCCESS); delegation = true; goto next_removenode; } @@ -8843,7 +8843,7 @@ zone_sign(dns_zone_t *zone) { * Remember the obscuring name so that * we skip all obscured names. */ - dns_name_copy(found, name, NULL); + RUNTIME_CHECK(dns_name_copy(found, name, NULL) == ISC_R_SUCCESS); is_bottom_of_zone = true; goto next_node; } diff --git a/lib/dns/zoneverify.c b/lib/dns/zoneverify.c index eb5aedc196..cd8f5692b8 100644 --- a/lib/dns/zoneverify.c +++ b/lib/dns/zoneverify.c @@ -1777,11 +1777,11 @@ verify_nodes(vctx_t *vctx, isc_result_t *vresult) { } if (is_delegation(vctx, name, node, NULL)) { zonecut = dns_fixedname_name(&fzonecut); - dns_name_copy(name, zonecut, NULL); + RUNTIME_CHECK(dns_name_copy(name, zonecut, NULL) == ISC_R_SUCCESS); isdelegation = true; } else if (has_dname(vctx, node)) { zonecut = dns_fixedname_name(&fzonecut); - dns_name_copy(name, zonecut, NULL); + RUNTIME_CHECK(dns_name_copy(name, zonecut, NULL) == ISC_R_SUCCESS); } nextnode = NULL; result = dns_dbiterator_next(dbiter); @@ -1862,7 +1862,7 @@ verify_nodes(vctx_t *vctx, isc_result_t *vresult) { } else { prevname = dns_fixedname_name(&fprevname); } - dns_name_copy(name, prevname, NULL); + RUNTIME_CHECK(dns_name_copy(name, prevname, NULL) == ISC_R_SUCCESS); if (*vresult == ISC_R_SUCCESS) { *vresult = tvresult; } diff --git a/lib/ns/query.c b/lib/ns/query.c index ce5d6374a1..6b04182411 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -2838,7 +2838,7 @@ rpz_rrset_find(ns_client_t *client, dns_name_t *name, dns_rdatatype_t type, query_rpzfetch(client, name, type); result = DNS_R_NXRRSET; } else { - dns_name_copy(name, st->r_name, NULL); + RUNTIME_CHECK(dns_name_copy(name, st->r_name, NULL) == ISC_R_SUCCESS); result = ns_query_recurse(client, type, st->r_name, NULL, NULL, resuming); if (result == ISC_R_SUCCESS) { @@ -3100,7 +3100,7 @@ rpz_save_p(dns_rpz_st_t *st, dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type, st->m.rpz = rpz; st->m.type = rpz_type; st->m.policy = policy; - dns_name_copy(p_name, st->p_name, NULL); + RUNTIME_CHECK(dns_name_copy(p_name, st->p_name, NULL) == ISC_R_SUCCESS); st->m.prefix = prefix; st->m.result = result; SAVE(st->m.zone, *zonep); @@ -4599,7 +4599,7 @@ query_findclosestnsec3(dns_name_t *qname, dns_db_t *db, dns_name_getlabelsequence(qname, skip, labels - skip, found); } else if (found != NULL) - dns_name_copy(&name, found, NULL); + RUNTIME_CHECK(dns_name_copy(&name, found, NULL) == ISC_R_SUCCESS); return; } @@ -4788,7 +4788,7 @@ redirect(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset, } CTRACE(ISC_LOG_DEBUG(3), "redirect: found data: done"); - dns_name_copy(found, name, NULL); + RUNTIME_CHECK(dns_name_copy(found, name, NULL) == ISC_R_SUCCESS); if (dns_rdataset_isassociated(rdataset)) dns_rdataset_disassociate(rdataset); if (dns_rdataset_isassociated(&trdataset)) { @@ -4888,7 +4888,7 @@ redirect2(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset, if (result != ISC_R_SUCCESS) return (ISC_R_NOTFOUND); } else { - dns_name_copy(redirectname, client->view->redirectzone, NULL); + RUNTIME_CHECK(dns_name_copy(redirectname, client->view->redirectzone, NULL) == ISC_R_SUCCESS); } options = 0; @@ -4958,7 +4958,7 @@ redirect2(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset, result = dns_name_concatenate(found, dns_rootname, found, NULL); RUNTIME_CHECK(result == ISC_R_SUCCESS); - dns_name_copy(found, name, NULL); + RUNTIME_CHECK(dns_name_copy(found, name, NULL) == ISC_R_SUCCESS); if (dns_rdataset_isassociated(rdataset)) dns_rdataset_disassociate(rdataset); if (dns_rdataset_isassociated(&trdataset)) { @@ -6356,7 +6356,7 @@ query_checkrpz(query_ctx_t *qctx, isc_result_t result) { SAVE(qctx->rpz_st->q.node, qctx->node); SAVE(qctx->rpz_st->q.rdataset, qctx->rdataset); SAVE(qctx->rpz_st->q.sigrdataset, qctx->sigrdataset); - dns_name_copy(qctx->fname, qctx->rpz_st->fname, NULL); + RUNTIME_CHECK(dns_name_copy(qctx->fname, qctx->rpz_st->fname, NULL) == ISC_R_SUCCESS); qctx->rpz_st->q.result = result; qctx->client->query.attributes |= NS_QUERYATTR_RECURSING; return (ISC_R_COMPLETE); @@ -7787,7 +7787,7 @@ query_prepare_delegation_response(query_ctx_t *qctx) { * it here in case we need it. */ dns_fixedname_init(&qctx->dsname); - dns_name_copy(qctx->fname, dns_fixedname_name(&qctx->dsname), NULL); + RUNTIME_CHECK(dns_name_copy(qctx->fname, dns_fixedname_name(&qctx->dsname), NULL) == ISC_R_SUCCESS); /* * This is the best answer. @@ -8240,7 +8240,7 @@ query_nodata(query_ctx_t *qctx, isc_result_t res) { return (ns_query_done(qctx));; } } - dns_name_copy(qctx->client->query.qname, qctx->fname, NULL); + RUNTIME_CHECK(dns_name_copy(qctx->client->query.qname, qctx->fname, NULL) == ISC_R_SUCCESS); qctx->dns64 = false; #ifdef dns64_bis_return_excluded_addresses /* @@ -8652,8 +8652,7 @@ query_redirect(query_ctx_t *qctx) { SAVE(qctx->client->query.redirect.sigrdataset, qctx->sigrdataset); qctx->client->query.redirect.result = DNS_R_NCACHENXDOMAIN; - dns_name_copy(qctx->fname, qctx->client->query.redirect.fname, - NULL); + RUNTIME_CHECK(dns_name_copy(qctx->fname, qctx->client->query.redirect.fname, NULL) == ISC_R_SUCCESS); qctx->client->query.redirect.authoritative = qctx->authoritative; qctx->client->query.redirect.is_zone = qctx->is_zone; @@ -8763,7 +8762,7 @@ query_synthnodata(query_ctx_t *qctx, const dns_name_t *signer, goto cleanup; } - dns_name_copy(signer, name, NULL); + RUNTIME_CHECK(dns_name_copy(signer, name, NULL) == ISC_R_SUCCESS); /* * Add SOA record. Omit the RRSIG if DNSSEC was not requested. @@ -8828,7 +8827,7 @@ query_synthwildcard(query_ctx_t *qctx, dns_rdataset_t *rdataset, result = ISC_R_NOMEMORY; goto cleanup; } - dns_name_copy(qctx->client->query.qname, name, NULL); + RUNTIME_CHECK(dns_name_copy(qctx->client->query.qname, name, NULL) == ISC_R_SUCCESS); cloneset = ns_client_newrdataset(qctx->client); if (cloneset == NULL) { @@ -8990,7 +8989,7 @@ query_synthnxdomain(query_ctx_t *qctx, goto cleanup; } - dns_name_copy(signer, name, NULL); + RUNTIME_CHECK(dns_name_copy(signer, name, NULL) == ISC_R_SUCCESS); /* * Add SOA record. Omit the RRSIG if DNSSEC was not requested. @@ -9021,7 +9020,7 @@ query_synthnxdomain(query_ctx_t *qctx, goto cleanup; } - dns_name_copy(nowild, name, NULL); + RUNTIME_CHECK(dns_name_copy(nowild, name, NULL) == ISC_R_SUCCESS); cloneset = ns_client_newrdataset(qctx->client); clonesigset = ns_client_newrdataset(qctx->client); @@ -9074,7 +9073,7 @@ checksignames(dns_name_t *signer, dns_rdataset_t *sigrdataset) { result = dns_rdata_tostruct(&rdata, &rrsig, NULL); RUNTIME_CHECK(result == ISC_R_SUCCESS); if (dns_name_countlabels(signer) == 0) { - dns_name_copy(&rrsig.signer, signer, NULL); + RUNTIME_CHECK(dns_name_copy(&rrsig.signer, signer, NULL) == ISC_R_SUCCESS); } else if (!dns_name_equal(signer, &rrsig.signer)) { return (ISC_R_FAILURE); } @@ -9491,8 +9490,7 @@ query_cname(query_ctx_t *qctx) { (qctx->fname->attributes & DNS_NAMEATTR_WILDCARD) != 0) { dns_fixedname_init(&qctx->wildcardname); - dns_name_copy(qctx->fname, - dns_fixedname_name(&qctx->wildcardname), NULL); + RUNTIME_CHECK(dns_name_copy(qctx->fname, dns_fixedname_name(&qctx->wildcardname), NULL) == ISC_R_SUCCESS); qctx->need_wildcardproof = true; } @@ -9604,8 +9602,7 @@ query_dname(query_ctx_t *qctx) { (qctx->fname->attributes & DNS_NAMEATTR_WILDCARD) != 0) { dns_fixedname_init(&qctx->wildcardname); - dns_name_copy(qctx->fname, - dns_fixedname_name(&qctx->wildcardname), NULL); + RUNTIME_CHECK(dns_name_copy(qctx->fname, dns_fixedname_name(&qctx->wildcardname), NULL) == ISC_R_SUCCESS); qctx->need_wildcardproof = true; } @@ -9797,8 +9794,7 @@ query_prepresponse(query_ctx_t *qctx) { (qctx->fname->attributes & DNS_NAMEATTR_WILDCARD) != 0) { dns_fixedname_init(&qctx->wildcardname); - dns_name_copy(qctx->fname, - dns_fixedname_name(&qctx->wildcardname), NULL); + RUNTIME_CHECK(dns_name_copy(qctx->fname, dns_fixedname_name(&qctx->wildcardname), NULL) == ISC_R_SUCCESS); qctx->need_wildcardproof = true; } @@ -10380,7 +10376,7 @@ query_addwildcardproof(query_ctx_t *qctx, bool ispositive, /* * Find the closest encloser. */ - dns_name_copy(name, cname, NULL); + RUNTIME_CHECK(dns_name_copy(name, cname, NULL) == ISC_R_SUCCESS); while (result == DNS_R_NXDOMAIN) { labels = dns_name_countlabels(cname) - 1; /* @@ -10433,7 +10429,7 @@ query_addwildcardproof(query_ctx_t *qctx, bool ispositive, */ labels = dns_name_countlabels(cname) + 1; if (dns_name_countlabels(name) == labels) - dns_name_copy(name, wname, NULL); + RUNTIME_CHECK(dns_name_copy(name, wname, NULL) == ISC_R_SUCCESS); else dns_name_split(name, labels, NULL, wname); diff --git a/lib/ns/update.c b/lib/ns/update.c index 738a9d828a..228870023f 100644 --- a/lib/ns/update.c +++ b/lib/ns/update.c @@ -706,7 +706,7 @@ foreach_rr(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name, add_rr_prepare_ctx_t *ctx = rr_action_data; ctx->oldname = dns_fixedname_initname(&fixed); - dns_name_copy(name, ctx->oldname, NULL); + RUNTIME_CHECK(dns_name_copy(name, ctx->oldname, NULL) == ISC_R_SUCCESS); dns_rdataset_getownercase(&rdataset, ctx->oldname); } @@ -1040,7 +1040,7 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db, t = ISC_LIST_HEAD(temp->tuples); while (t != NULL) { name = &t->name; - (void)dns_name_copy(name, tmpname, NULL); + RUNTIME_CHECK(dns_name_copy(name, tmpname, NULL) == ISC_R_SUCCESS); *typep = t->rdata.type; /* A new unique name begins here. */ diff --git a/lib/samples/nsprobe.c b/lib/samples/nsprobe.c index 0ca51dd718..ecf396fc12 100644 --- a/lib/samples/nsprobe.c +++ b/lib/samples/nsprobe.c @@ -911,7 +911,7 @@ resolve_ns(isc_task_t *task, isc_event_t *event) { ISC_LIST_APPEND(trans->nslist, pns, link); ISC_LIST_INIT(pns->servers); - dns_name_copy(&ns.name, pns->name, NULL); + RUNTIME_CHECK(dns_name_copy(&ns.name, pns->name, NULL) == ISC_R_SUCCESS); dns_rdata_reset(&rdata); dns_rdata_freestruct(&ns); }