mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
The final round of adding RUNTIME_CHECK() around dns_name_copy() calls
This commit was done by hand to add the RUNTIME_CHECK() around stray dns_name_copy() calls with NULL as third argument. This covers the edge cases that doesn't make sense to write a semantic patch since the usage pattern was unique or almost unique.
This commit is contained in:
committed by
Mark Andrews
parent
89b269b0d2
commit
5efa29e03a
@@ -4517,21 +4517,27 @@ find_deepest_zonecut(rbtdb_search_t *search, dns_rbtnode_t *node,
|
||||
if (foundname != NULL) {
|
||||
dns_name_init(&name, NULL);
|
||||
dns_rbt_namefromnode(node, &name);
|
||||
result = dns_name_copy(&name, foundname, NULL);
|
||||
while (result == ISC_R_SUCCESS && i > 0) {
|
||||
RUNTIME_CHECK(dns_name_copy(&name, foundname,
|
||||
NULL)
|
||||
== ISC_R_SUCCESS);
|
||||
while (i > 0) {
|
||||
i--;
|
||||
level_node = search->chain.levels[i];
|
||||
dns_name_init(&name, NULL);
|
||||
dns_rbt_namefromnode(level_node,
|
||||
&name);
|
||||
result =
|
||||
dns_name_concatenate(foundname,
|
||||
&name,
|
||||
foundname,
|
||||
NULL);
|
||||
result = dns_name_concatenate(foundname,
|
||||
&name,
|
||||
foundname,
|
||||
NULL);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
*nodep = NULL;
|
||||
if (nodep != NULL) {
|
||||
*nodep = NULL;
|
||||
}
|
||||
goto node_exit;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user